Skip to content

Commit 64f5199

Browse files
authored
Note PowerBI source refresh (#649)
1 parent dc39577 commit 64f5199

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/testing/power-automate-troubleshooting.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshoot Office Scripts running in Power Automate
33
description: Tips, platform information, and known issues with the integration between Office Scripts and Power Automate.
44
ms.topic: troubleshooting-general
5-
ms.date: 09/08/2023
5+
ms.date: 09/15/2023
66
ms.localizationpriority: medium
77
---
88

@@ -19,7 +19,7 @@ Power Automate runs your script in the chosen Excel workbook on your behalf. The
1919

2020
Some relative reference APIs throw errors in Power Automate. Others have a default behavior that implies a user's state. When designing your scripts, be sure to use absolute references for worksheets and ranges. This makes your Power Automate flow consistent, even if worksheets are rearranged.
2121

22-
### Script methods that fail when run in Power Automate flows
22+
### Script methods that fail in Power Automate flows
2323

2424
The following methods throw an error and fail when called from a script in a Power Automate flow.
2525

@@ -42,11 +42,11 @@ The following methods use a default behavior, in lieu of any user's current stat
4242
| [Workbook](/javascript/api/office-scripts/excelscript/excelscript.workbook) | `getActiveWorksheet` | Returns either the first worksheet in the workbook or the worksheet currently activated by the `Worksheet.activate` method. |
4343
| [Worksheet](/javascript/api/office-scripts/excelscript/excelscript.worksheet) | `activate` | Marks the worksheet as the active worksheet for purposes of `Workbook.getActiveWorksheet`. |
4444

45-
## Refresh not supported in Power Automate
45+
## Refresh not fully supported in Power Automate
4646

47-
Office Scripts can't refresh data when run in Power Automate. Refresh methods such as `PivotTable.refresh` do nothing when called in a flow. Additionally, Power Automate doesn't trigger a data refresh for formulas that use workbook links.
47+
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.
4848

49-
### Script methods that do nothing when run in Power Automate flows
49+
### Script methods that do nothing in Power Automate flows
5050

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

@@ -57,6 +57,14 @@ The following methods do nothing in a script when called through Power Automate.
5757
| [Workbook](/javascript/api/office-scripts/excelscript/excelscript.workbook) | `refreshAllPivotTables` |
5858
| [Worksheet](/javascript/api/office-scripts/excelscript/excelscript.worksheet) | `refreshAllPivotTables` |
5959

60+
### Script methods with a different behavior in Power Automate
61+
62+
The following methods act differently in Power Automate flows than they do when run through Excel.
63+
64+
| Class | Method | Power Automate behavior |
65+
|--|--|--|
66+
| [Workbook](/javascript/api/office-scripts/excelscript/excelscript.workbook) | `refreshAllDataConnections` | Only refreshes PowerBI sources. |
67+
6068
## Select workbooks with the file browser control
6169

6270
When building the **Run script** step of a Power Automate flow, you need to select which workbook is part of the flow. Use the file browser to select your workbook, instead of manually typing the workbook's name.

0 commit comments

Comments
 (0)