Forum Discussion
Mike_Y_123
May 02, 2024Copper Contributor
Office Scripts triggered on sheet activation - to Refresh all data connections
Hi,
I have recorded the below office script that refreshes all data connections. I want this script to run when a sheet named "Delivery date" is activated (i.e. when the user swaps from another sheet to this sheet)
It would appear that this is possible, as I found the below help article but I can't get it to work...
function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections();
}
Thank for your help
Mike
- JKPieterseSilver ContributorThe documentation you refer to pertains to the Office-JavaScript automation model, which is a different animal than Office Script. You would have to create an Office Add-in to be able to use those events.
For now, Office Script does not have any events I'm afraid.