Skip to main content

Notifications

Power Automate - Building Flows
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
  • Ellis Karim Profile Picture
    Ellis Karim 10,511 on at
    Using script to refresh Excel data connection to dataverse
    Hi @Guy Boswell​​​​​​​,
     
    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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard