Forum Discussion
PDTaylor
Oct 22, 2021Copper Contributor
Excel Script - Refresh data
Hi, I have an excel file which has a data connection. I have been trying to get the data and associated pivot tables to refresh through a script but it doesn't seem to work fully. The script is ...
BaronK2230
Jul 22, 2024Copper Contributor
does it work for queries?
SergeiBaklan
Jul 22, 2024Diamond Contributor
It depends on do we speak about Excel desktop or Excel for web.
On desktop workbook.refreshAllDataConnections() works the same way as Refresh All button.
On web only connections to the sources in the same file or anonymous ODate are refreshed. Why so and could it be resolved is in comments to Power Query Refresh is now generally available in Excel for the web (microsoft.com)