You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/testing/power-automate-troubleshooting.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Troubleshoot Office Scripts running in Power Automate
3
3
description: Tips, platform information, and known issues with the integration between Office Scripts and Power Automate.
4
4
ms.topic: troubleshooting-general
5
-
ms.date: 09/08/2023
5
+
ms.date: 09/15/2023
6
6
ms.localizationpriority: medium
7
7
---
8
8
@@ -19,7 +19,7 @@ Power Automate runs your script in the chosen Excel workbook on your behalf. The
19
19
20
20
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.
21
21
22
-
### Script methods that fail when run in Power Automate flows
22
+
### Script methods that fail in Power Automate flows
23
23
24
24
The following methods throw an error and fail when called from a script in a Power Automate flow.
25
25
@@ -42,11 +42,11 @@ The following methods use a default behavior, in lieu of any user's current stat
42
42
|[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. |
43
43
|[Worksheet](/javascript/api/office-scripts/excelscript/excelscript.worksheet)|`activate`| Marks the worksheet as the active worksheet for purposes of `Workbook.getActiveWorksheet`. |
44
44
45
-
## Refresh not supported in Power Automate
45
+
## Refresh not fully supported in Power Automate
46
46
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.
48
48
49
-
### Script methods that do nothing when run in Power Automate flows
49
+
### Script methods that do nothing in Power Automate flows
50
50
51
51
The following methods do nothing in a script when called through Power Automate. They still return successfully and don't throw any errors.
52
52
@@ -57,6 +57,14 @@ The following methods do nothing in a script when called through Power Automate.
### 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
+
60
68
## Select workbooks with the file browser control
61
69
62
70
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