Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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,
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |