Forum Discussion
sway-bob
Sep 21, 2021Copper Contributor
create a script
Hello community, i have a excel file which take his data from the web. When i click on "refresh all" i get the current data. so i created a script which do that for me. But unfortunately the dat...
- Sep 22, 2021you can refresh all connections with this piece of code
ThisWorkbook.RefreshAll
or just your desired connection with
ActiveWorkbook.Connections("YourConnectionName").Refresh
Juliano-Petrukio
Sep 22, 2021Bronze Contributor
you can refresh all connections with this piece of code
ThisWorkbook.RefreshAll
or just your desired connection with
ActiveWorkbook.Connections("YourConnectionName").Refresh
ThisWorkbook.RefreshAll
or just your desired connection with
ActiveWorkbook.Connections("YourConnectionName").Refresh
- sway-bobSep 23, 2021Copper Contributorthe excel list is also set to "auto save".
I run the script and open the file and see that the list has not updated. Should I have to extend the code and say that it has to save it?- JKPieterseSep 23, 2021Silver ContributorThe script always operates on the file that you have open, so you cannot use this on a file that is not currently the active (open) file. To refresh a workbook stored on Sharepoint you can use a Flow.