2

I started using the new Office Scripts in Excel on the web. I was wondering if anyone knows if it´s possible to Refresh the Queries and Connections of an Excel Workbook saved on SharePoint Online.

I would like to run the script utilizing a Scheduled Flow in Power Automate.

There seems to be a workbook.refreshAllDataConnections() Method in typescript (when writing in the Script Editor) but it doesn´t really do anything.

enter image description here

Thank you in advance for your help!

SLazz
  • 21
  • 1
  • 5

1 Answers1

1

The Power Query refresh is not supported for the time being. Regarding other types of connections, it is not yet detailed out in the API. There's a docs bug open to get clarification on what types of connections are supported.

Docs bug: https://github.com/OfficeDev/office-js-docs-reference/issues/805

Sudhi Ramamurthy
  • 2,358
  • 1
  • 10
  • 14
  • Just to add on here, there is a Power Query connector—if you're able to accomplish your scenario with the connections made in Power Automate instead of Excel, this should be achievable. – Daniel G. Wilson Oct 05 '20 at 19:13
  • 1
    @DanielG.Wilson's comment got me excited about the possibility of a Power Query connector, but it is currently only available as a premium connector to SQL Server [link](https://learn.microsoft.com/en-us/connectors/sql/#transform-data-using-power-query) – Cory Dec 02 '20 at 17:20
  • Ahhh @Cory, you're totally right—apologies – Daniel G. Wilson Dec 03 '20 at 00:09