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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.