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 / Connecting PowerAutoma...
Power Automate
Answered

Connecting PowerAutomate to Excel File

(1) ShareShare
ReportReport
Posted on by 27

Hello - 

 

I have been trying to get an excel file stored in SharePoint (Saw on another forum this needs to be the case, cannot be saved locally) to automatically refresh my data from a sql database connection.  To do this, we have made a Script to refresh the data which does work when running it in the excel file itself, however the issue we are having is that PowerAutomate doesn't seem to be connecting to the file, so nothing is refreshing even though the Tests are successful.  In PowerAutomate we have selected the correct file and path, so we are not sure why they aren't making that connection. 

 

Any help would be greatly appreciated!

Categories:
  • trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Hi @Dharber ,

     

    I think there are lots of people on here that will help; can you share your flow, errors, etc?  It's hard to just start guessing what the issue is without seeing anything.  Otherwise, you most likely will get a handful or very little engagement of replies that don't really address the issue.  On the surface, this sounds very resolvable. 

     

     

     

     

  • Dharber Profile Picture
    27 on at

    Hello @trice602 - 

    Apologies, haven't used this forum very often.  

     

    No errors to show, below is the Flow in PowerAutomate and the script we are using in BI. Like I said the script works, we just can't get the connection to excel.  The crossed-out part is the path which we believe to be correct and not the issue (covered for privacy).  

    Flow.png
    Script.png
  • Dharber Profile Picture
    27 on at

    Sorry, Script we are using in Excel**

  • trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Hi @Dharber ,

     

    Thanks for sharing, very helpful.  The issue is this isn't supported from Power Automate and there's a super user that replied here that offers some good alternatives: Workbook.refreshAllDataConnections() is not suppor... - Power Platform Community (microsoft.com)

     

    My preferred approach is a quick Power Automate Desktop unattended flow that simply opens up this excel worksheet and presses the refresh all button, saves, closes, returns to your cloud flow.  Given that, I'm using premium licensing and is the easy button.  A longer approach, but also works well, is to put your sql connection in a dataflow and you do have the ability to refresh a dataflow from your power automate cloud flow.  If you haven't used dataflows, its essentially the PowerQuery for the Power Platfrom (looks and feels exactly the same).

     

    Dataflow option:

     

    trice602_0-1694123500840.png

     

    Desktop flow option:

     

    trice602_1-1694123545553.png

     

     

    That said, I hope someone else can provide some alternatives, I'm also following this post to see replies and solutions. 

     

     

  • Dharber Profile Picture
    27 on at

    With this dataflow option, it looks like it is refreshing the data set in PowerBi, which is the same data set, however this doesn't translate into the Excel file.  Is there a way to make this happen or do you need to desktop (paid) version?

     

  • trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Hi @Dharber ,

     

    Dataflows is a premium action and after your refresh your content you can create an Excel file.  It is largely identical to Power Query.  As an example, you would start with a completely blank table and then your sql query would run and populate a table.  If you needed an excel file, you can create that with the refreshed content.

     

     

  • Dharber Profile Picture
    27 on at

    Hi @trice602 
    It looks like someone on the team has the premium version. With this, it should be a simple desktop flow as you outlined above, correct? 

    I appreciate your help on this!!

  • Verified answer
    trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Hi @Dharber ,

     

    Yes.  The desktop flow may look like this or you can actually click on the buttons to refresh.  Here I am showing you the Send Keys version where:

     

    Alt A R A //refreshes all

    Control S // saves

     

    trice602_0-1694184755834.png

     

     

  • Dharber Profile Picture
    27 on at

    Awesome, appreciate it!

     

  • trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Happy Friday!  A great way to start the day 🙂

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard