Fix Excel Online Office Scripts Running Slowly Due to AutoSave
Question details
Office Scripts converted from VBA take significantly longer to run in Excel Online because the workbook automatically saves repeatedly during execution.

- Product
- Excel Online, Power Automate
- Device & OS
- not provided
- Scenario
- Running an automated Office Script on Excel Online via Power Automate.
- Observed behavior
- The extended script execution time caused by continuous AutoSave triggers the default timeout limits in Power Automate flows, causing the automation to fail.
Before attempting to fix script performance, check your Power Automate flow timeout limits and ensure you have a backup copy of your original VBA or TypeScript code.
Optimize and Redesign the Office Script
Because AutoSave cannot be disabled in Excel Online, the most effective solution is to optimize the script's logic to minimize execution time.
Office Scripts operate differently than local VBA macros. When a script runs in Excel Online, repeated read and write operations trigger AutoSave, causing delays. To resolve this, you must reduce the number of times the script interacts with the workbook.
Review your Office Script and identify loops that read from or write to the spreadsheet cell-by-cell.
Modify the code to read a large range of data into an array at once, process the array in memory, and then write the entire array back to the workbook in a single operation.
Delete script steps that apply visual formatting (like colors or borders) if they are not strictly required for the data processing task.
Run the optimized script directly in Excel Online to verify execution speed before reconnecting it to your Power Automate flow.

Submit Feedback for AutoSave Controls
Request improved AutoSave controls directly from Microsoft, as the feature cannot currently be toggled off for scripts in Excel Online.
Use WPS Office for Fast, Reliable Desktop Macros
If Excel Online's forced AutoSave and cloud latency are disrupting your automated workflows, consider switching to WPS Office. WPS provides powerful desktop spreadsheet capabilities with full support for traditional VBA macros, bypassing cloud sync delays entirely.
- 1. Install WPS Office: Download and install the free version of WPS Office on your desktop.
- 2. Open your workbook: Launch WPS Spreadsheet and open your existing .xlsm or .xlsx file.
- 3. Run macros locally: Navigate to the Developer tab to run your VBA macros locally at full speed, unaffected by web timeouts.

Frequently Asked Questions
Can I temporarily disable AutoSave in Excel Online while a script runs?
No, Microsoft currently does not offer a way to disable AutoSave in Excel Online. The workbook continuously saves changes to the cloud, which is why optimizing your script to batch updates is necessary.
Why do Office Scripts run so much slower than my original VBA macros?
VBA macros run locally on your desktop and interact directly with your computer's memory. Office Scripts run via web APIs in the cloud. Every cell read or write operation requires a network call and triggers an AutoSave, which introduces significant latency.
How can I prevent Power Automate from timing out when running Excel scripts?
You can prevent timeouts by reducing the script's execution time (batching operations instead of cell-by-cell loops), breaking large processes into multiple smaller scripts, or adjusting the timeout duration in the Power Automate action settings.
Does directly converting VBA to Office Script guarantee the same performance?
No. A direct, line-by-line translation of VBA to TypeScript often results in poor performance because web-based execution is highly sensitive to the number of API calls made. The logic must usually be redesigned to suit a cloud environment.




