Forum Discussion
Dan44
2 years agoHelper I
Auto 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
2 years agoHelper I
JGroothedde 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
2 years agoResolver II
Ah 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!