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 ...
DirkvH
Nov 15, 2023Copper Contributor
I used your code and it did not work
I did not get an error message but the pivot table just did not refresh
by adding () at the end and it works
sample code
function main(workbook: ExcelScript.Workbook) {
// Refresh Pivot Tables
workbook.refreshAllPivotTables()
}
I know it is a bit late but perhaps someone still has some use for this
😉
😉
Martin_Kryger
Jun 18, 2024Copper Contributor
This one works, thank you!