How to save refreshed data in existing excel file saved on SharePoint site?

Sumeet Kumar Tamta 0 Reputation points
2025-07-25T14:16:45.39+00:00

Need help to know how we can autosave refreshed data in an existing excel file if it's saved on SharePoint site.

I am working on a project for sharing an excel file (which is saved on SharePoint site) in which I am pulling data from another source. I want to schedule daily data refresh for this excel file with Power Automate Cloud Flow. I wrote scripts in excel file to Refresh All data and save excel file but seems SharePoint is not recognizing 'workbook.save()' function in that excel file. How can make sure that function work in SharePoint excel file and same script can be run under Power Automate Cloud Flow

workbook.save();
Microsoft 365 and Office | SharePoint | Other | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Phoebe-N 7,110 Reputation points Microsoft External Staff Moderator
    2025-07-25T14:45:23.54+00:00

    Hi @Sumeet Kumar Tamta 

    Good day! Welcome to Q&A forum! 

    I understand you're working on a project to automatically refresh and save an Excel file on SharePoint using Power Automate Cloud Flow, but you're finding that workbook.save() within your Excel script isn't working as expected.

    To help you get this working, I need to understand a bit more about your current setup, please answer the following questions: 

    • Please share the full VBA code you are currently using in your Excel file to 'Refresh All data' and attempt to save? (Please include all lines, not just workbook.save()) 
    • Could you describe the specific steps and actions you are using within your Power Automate Cloud Flow? Specifically, are you using an 'Excel Online (Business)' connector, and if so, what specific action are you trying to use to interact with your Excel file? 
    • What kind of 'another source' are you pulling data from into this Excel file (e.g., a SharePoint List, a SQL database, another Excel file, a web page)? Also, is this data pulled in using Power Query within Excel, or is it an older type of data connection? 

    In the meantime, please read this article Refresh an external data connection in Excel - Microsoft Support and Run Office Scripts with Power Automate - Office Scripts | Microsoft Learn to check for any possible core reasons and solutions.    

    Looking forward to your updates.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.