Forum Discussion
Sanskruti30
Oct 23, 2023Copper Contributor
Script not working
Hello,
I have an excel sheet which has two sheets in it which has pivot tables and i have created a script to refresh the data. The data is coming from power bi dataset.
"
function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections();
}"
I have triggred this in power automate.
But when i run this only one sheets data is getting refreshed the another sheet is as it is. No changes in it.
Any idea why it is working this way? I'm working on web excel.
Thank you in advance.
I have triggred this in power automate.
But when i run this only one sheets data is getting refreshed the another sheet is as it is. No changes in it.
Any idea why it is working this way? I'm working on web excel.
Thank you in advance.
3 Replies
Sort By
So far in Excel for web we may refresh connections only for the source which is in the same workbook (i.e. tables or ranges within it). External data connections are not refreshed. Doesn't matter you do that manually or by script.
- Sanskruti30Copper ContributorBut the sheet1 is getting refreshed. Only the sheet2 is not getting refreshed.
Sorry, I missed with Power Query refreshed. With PivotTable table only it shall work. As for refreshing being on Desktop I'd uncheck background refresh, but on Web it shall be unchecked by default.
Sorry again, have no answer.