Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Querytable.refresh vs ListObject().Refresh

Hi everyone,

 

I am sharing this question because I am a bit puzzled.

The question is not directly related to Power BI since it is about refreshing data loaded into an Excel worksheet from a PQ query, with VBA.

 

Situation

I am used to refresh data collected with Power Query from different sources into Excel worksheets using VBA. I used different methods to do so:

- Thisworkbook.Connections("query_name").OLEDBConnection.Refresh

- Sh.Listobjects("tbl_output_name").Querytable.Refresh

Recently, on one of my colleagues told that the "Querytable" of the second method was useless. He was used to refresh his own Excel output data from PQ Queries simply using : Sh.Listobjects("tbl_output_name").Refresh.

 

Question

Three different ways to refresh the same data : Is there a best way among these three ?

I assumed that the answer is "Yes". Then why is it the best ?

After that : what difference between Sh.Listobjects("tbl_output_name").Querytable.Refresh and Sh.Listobjects("tbl_output_name").Refresh in term of impacts and efficiency ?

Before posting here, I made some research with no success. The Documentation doesn't answer to these questions. 

 

Thank you in advance for your lights.

Regards,

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Please see if the document can help:

VBA to optimise Refresh and list all Connections with refresh time | MrExcel Message Board

QueryTable.Refresh method (Excel) | Microsoft Learn

ListObject.QueryTable property (Excel) | Microsoft Learn

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.