Forum Discussion
Dan44
Helper I
2 years agoAuto Refresh Excel Report with Power Pivot Data Model
Hi all, I have this Office Script which can be scheduled in Excel: function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections...
Dan44
Helper I
2 years agoJGroothedde thanks for getting back. When you say pivot table I am instead using Power Pivot from the data model. So I am trying to refresh the power pivot enabled Excel report sourcing data through Power Query, with the following:
function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections();
// Refresh all pivot tables
workbook.refreshAllPivotTables();
}
However still no luck (when scheduling the script but works fine when manually running it). Can you please let me know how you were able to schedule refreshes yourself?
JGroothedde
Resolver II
2 years agoAh sorry i think i misunderstood. Let me check and see this afternoon if i can get it to work. It's an interesting problem! 🙂 Will get back to you!