Hello everyone,
I'm encountering an issue with a Power Automate flow involving Excel Online. Inside an "Apply to each" loop, I initially used the "Update a row" action to modify a row in an Excel table, followed by a "Run script" action that executes an Office Script on the same file.
The script is straightforward—it generates a scatter plot based on the updated row values. However, the results have been inconsistent:
- Sometimes, the flow runs perfectly and all rows are processed with the correct values.
- Other times, the flow still completes successfully, but the first row processed ends up with incorrect values in the chart generated by the script.
I verified that the values passed to the "Update a row" action were correct at every step. I tried several workarounds, including:
- Adding delays and "Delay until" actions
- Using conditions to control execution timing
- Replacing "Update a row" with "Add a row"
- Adjusting the concurrency settings of the loop
Despite these efforts, the issue persisted. It seems like there might be a timing or caching issue between the "Update a row" and "Run script" actions—especially since the problem consistently affects the first iteration.
Temporary Workaround
For now, I’ve resolved the issue by removing the "Update a row" action entirely and instead passing the necessary parameters directly to the Office Script with the Run Script action. I modified the script to accept these inputs and generate the chart accordingly.
While this workaround appears to work, I’m concerned about scalability—I need to test this flow with over 600 rows, and if Excel Online has a caching or synchronization issue, even this approach might eventually produce inconsistent results.
I believe this is worth discussing further to identify more robust solutions or best practices. Has anyone else experienced similar behavior or found a more reliable workaround?
Thanks in advance for your insights!
Best regards,
RC

Report
All responses (
Answers (