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 / Using script to refres...
Power Automate
Unanswered

Using script to refresh Excel data connection to dataverse

(0) ShareShare
ReportReport
Posted on by 234
I am trying to grab values (total number of members) from a Dynamics Real Time Segment
I have an Excel spreadsheet with a link to the Datverse table
I have a Type Script that updates the data connection, finds the values I want and copies them to another table.
All of this works fine if I run the script from within the app.
I have a flow that runs the script.
If I run the script from the flow, the script runs fine, no errors.  All the other steps in the script work as expected.
But the refresh statement doesn't do anything.
 
Any suggestions?  Thank you for your help.  Guy
Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,940 Super User 2026 Season 1 on at
     
    Please check the following:
     

    Refresh not fully supported in Power Automate

    Office Scripts can't refresh most data when run in Power Automate. Most refresh methods, such as PivotTable.refresh, do nothing when called in a flow. Workbook.refreshAllDataConnections only refreshes when PowerBI is the source. Additionally, Power Automate doesn't trigger a data refresh for formulas that use workbook links.

    Script methods that do nothing in Power Automate flows

    The following methods do nothing in a script when called through Power Automate. They still return successfully and don't throw any errors.

    Class Method
    PivotTable refresh
    Workbook refreshAllPivotTables
    Worksheet refreshAllPivotTables

    Script methods with a different behavior in Power Automate

    The following methods act differently in Power Automate flows than they do when run through Excel.

    Class Method Power Automate behavior
    Workbook refreshAllDataConnections Only refreshes PowerBI sources. For other sources, the method returns successfully but does nothing.
     
     

    Ellis Karim Ellis Karim
    Blog | LinkedIn | Bluesky

    ​​​​​​​

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 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard