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
Hi Dan44 unfortunately i haven't gotten around testing it yet, will probably have some time to get into this next week. Have a good weekend for now!
- Dan442 years agoHelper I
JGroothedde hi again just wondered if you had any suggestions? Unfortunately is a tricky one! Thanks