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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / refresh excel every mo...
Power Automate
Unanswered

refresh excel every morning

(2) ShareShare
ReportReport
Posted on by 24

Hello everyone,

 

i try the following.

A workflow that every morning open my excel file, refreshed it, saves and close again.

What would the process look like? 🤗

Thank you in advance

 

SQLPower_0-1631774799403.png

 

 

 

Categories:
I have the same question (0)
  • RemcoV16 Profile Picture
    52 on at

    Hi,

     

    Are you working in an Excel Online file?

    In that case, you can have a Flow run every day "Reoccurence" and have an Excel Script refresh the data.

    If you're unfamiliar with this or unsure how to do so, let me know, and I'll show you.

     

    Regards,

    Remco

  • SQL-Power Profile Picture
    24 on at

    Hi @RemcoV16 ,

     

    yes. Please show me how i can update this. I thank you very much.  🙂

     

    Regards,

    SQL-Power

  • RemcoV16 Profile Picture
    52 on at

    Hi,

     

    First ensure that your Excel file is stored in an online location (Like Drive or SharePoint). Not sure how it works with an offline Excel file. Then, I would build something like this:

     

    RemcoV16_0-1632146020714.png

    The Flow triggers daily at 8:00 AM now and runs a created script (similar to Excel Macro's).

    You can either record the script yourself, or paste the code below in a new script.

     

    function main(workbook: ExcelScript.Workbook) {
      // Refresh all data connections
      workbook.refreshAllDataConnections();
    }

     

    Both can be done via the "Automate" Tab in Excel (see highlighted below (even though in Dutch)):

    RemcoV16_1-1632146134769.png

    After refreshing the data, the Flow will send an email to the email-address filled in. 

     

    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up.

     

    Regards,

    Remco

  • SQL-Power Profile Picture
    24 on at

    Thank for your solution but i have a little problem.

     

    i cant see my script although i creates one.

  • RemcoV16 Profile Picture
    52 on at

    Can you see your script within Excel Online? Otherwise it might not have saved correctly.

    If you have added the script with your Flow open, be sure to save the Flow, refresh the page and try again.

  • SQL-Power Profile Picture
    24 on at

    i dont know why i cant see my script ... 😕 i already saved an close the excel file

    1.JPG2.JPG

  • RemcoV16 Profile Picture
    52 on at

    If you open your Excel online, do you see the script?

     

    RemcoV16_0-1632212522239.png

    If it does not show here, your Flow won't find it either.

     

  • SQL-Power Profile Picture
    24 on at

    Thank you very much for your efforts. I managed to create.

    But unfortunately I am still faced with one of the following questions / problems.

     

     

    I created the workflow and I want it to run every minute.
    After the workflow was successfully completed, I opened the Excel list, which is saved on my desktop, and the data has not been updated: /

    Do I have to make further settings in the Excel list?

  • RemcoV16 Profile Picture
    52 on at

    Hi,

     

    I'm unsure whether you are able to do this with a file that is stored on your desktop.

    Could you try saving the Flow in SharePoint or Drive, and see if the file gets updated that way?

  • SQL-Power Profile Picture
    24 on at

    the code isn't working 

    SQLPower_0-1632230427724.png

    and the excel file is in the onedrive 🙂 

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard