web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Force Save Chan...
Power Automate
Suggested Answer

How to Force Save Changes in an Excel Workbook via Power Automate?

(1) ShareShare
ReportReport
Posted on by 4

Hi all,

I'm using Power Automate to run a workflow that opens an Excel workbook stored in OneDrive/SharePoint, executes a Power Query (to refresh data), and then runs an Office Script to perform some updates. The flow works as expected, but the changes seem to be kept in memory and are not saved to the actual file - meaning the workbook doesn't reflect the changes until someone manually opens the workbook.

 

Is there a reliable way to force the workbook to save changes after running Power Query and Office Script via Power Automate?

 

Thanks in advance!

Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
     
    Can u try this office script ?
     
    function main(workbook: ExcelScript.Workbook) {
      // Access the active worksheet
      const sheet = workbook.getActiveWorksheet();
      // Define the target cell (e.g., cell A1)
      const targetCell = sheet.getRange("A1");
      // Write a value to the cell
      targetCell.setValue("Temporary Data");
      // Force a full calculation to ensure the change is registered
      workbook.getApplication().calculate(ExcelScript.CalculationType.full);
      // Clear the content of the cell
      targetCell.clear(ExcelScript.ClearApplyTo.contents);
    }
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard