Skip to content

Commit 6b991a3

Browse files
authored
Merge pull request #617 from OfficeDev/main
[admin] Publish
2 parents fe85458 + b1abaef commit 6b991a3

File tree

8 files changed

+40
-28
lines changed

8 files changed

+40
-28
lines changed

docs/develop/external-calls.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: External API call support in Office Scripts
33
description: Support and guidance for making external API calls in an Office Script.
4-
ms.date: 03/15/2023
4+
ms.date: 04/20/2023
55
ms.localizationpriority: medium
66
---
77

@@ -79,12 +79,7 @@ You can [apply IRM settings](/microsoft-365/compliance/apply-irm-to-a-list-or-li
7979
8080
## External calls from Power Automate
8181
82-
Any external API call fails when a script is run with Power Automate. This is a behavioral difference between running a script through the Excel application and through Power Automate. Be sure to check your scripts for such references before building them into a flow.
83-
84-
You'll have to use [HTTP with Azure AD](/connectors/webcontents/) or other equivalent actions to pull data from or push it to an external service.
85-
86-
> [!WARNING]
87-
> External calls made through the Power Automate [Excel Online connector](/connectors/excelonlinebusiness) fail in order to help uphold existing data loss prevention policies. However, scripts that are run through Power Automate are done so outside of your organization, and outside of your organization's firewalls. For additional protection from malicious users in this external environment, your admin can control the use of Office Scripts. Your admin can either disable the Excel Online connector in Power Automate or turn off Office Scripts for Excel through the [Office Scripts administrator controls](/microsoft-365/admin/manage/manage-office-scripts-settings).
82+
[!INCLUDE [External calls in Power Automate](../includes/external-calls-power-automate.md)]
8883
8984
## See also
9085

docs/docfx.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,11 @@
4747
"ms.author": "o365devx",
4848
"author": "o365devx",
4949
"ms.topic": "conceptual",
50-
"ms.technology": "scripts",
51-
"ms.prod": "excel",
50+
"ms.subservice": "scripts",
51+
"ms.service": "excel",
5252
"titleSuffix": "Office Scripts"
5353
},
5454
"fileMetadata": {
55-
"ms.prod": {
56-
"develop/*.md": "excel",
57-
"overview/*.md": "excel",
58-
"resources/*.md": "excel",
59-
"testing/*.md": "excel"
60-
},
6155
"ms.topic": {
6256
"resources/samples/*.md": "sample",
6357
"resources/scenarios/*.md": "sample",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
External API calls fail when a script is run through Power Automate. A `fetch` call will give the error message "Runtime error: Line X: fetch is not defined". Be sure to check your scripts for such references before building them into a flow.
2+
3+
You'll have to use [HTTP with Azure AD](/connectors/webcontents/) or other equivalent actions to pull data from or push it to an external service.
4+
5+
> [!WARNING]
6+
> External calls made through the Power Automate [Excel Online connector](/connectors/excelonlinebusiness) fail in order to help uphold existing data loss prevention policies. However, scripts that are run through Power Automate are done so outside of your organization, and outside of your organization's firewalls. For additional protection from malicious users in this external environment, your admin can control the use of Office Scripts. Your admin can either disable the Excel Online connector in Power Automate or turn off Office Scripts for Excel through the [Office Scripts administrator controls](/microsoft-365/admin/manage/manage-office-scripts-settings).

docs/includes/platform-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
To use Office Scripts, you'll need the following.
22

33
1. Excel for Windows (version 2210 or higher), Excel for Mac, or Excel on the web.
4-
*The [Action Recorder](../overview/excel.md#action-recorder) is not yet available in the [Semi-Annual Enterprise Channel](/deployoffice/updates/overview-update-channels#semi-annual-enterprise-channel-overview).*
4+
- *The [Action Recorder](../overview/excel.md#action-recorder) is not yet available in the [Semi-Annual Enterprise Channel](/deployoffice/updates/overview-update-channels#semi-annual-enterprise-channel-overview).*
55
1. OneDrive for Business.
66
1. Any commercial or educational Microsoft 365 license with access to the Microsoft 365 Office desktop apps, such as:
77
- Office 365 Business

docs/overview/script-storage.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Office Scripts file storage and ownership
33
description: Information about how Office Scripts are stored in Microsoft OneDrive and transferred between owners.
4-
ms.date: 03/14/2022
4+
ms.date: 04/24/2023
55
ms.localizationpriority: medium
66
---
77

@@ -15,7 +15,7 @@ Excel only recognizes and runs a script if it's in your OneDrive folder, a Share
1515

1616
The default behavior is that Office Scripts are stored in your OneDrive. The **.osts** files are found in the **/Documents/Office Scripts/** folder. Any edits made to these **.osts** files, such as renaming or deleting files, will be reflected in the Code Editor and Script Gallery.
1717

18-
Scripts that are shared with one of your workbooks remain in the script creator's OneDrive. They are not copied to any of your local or OneDrive folders when you run the shared script in Excel. The **Make a Copy** button of the Code Editor saves a separate copy of the script in your OneDrive. Changes to the copy don't affect the original script.
18+
Scripts that are shared with one of your workbooks remain in the script creator's OneDrive. They are not copied to any of your local or OneDrive folders when you run the shared script in Excel. The **Move** button shown when renaming a script moves the script to a new location. The **Make a Copy** button of the Code Editor saves a separate copy of the script in your OneDrive. Changes to the copy don't affect the original script.
1919

2020
Unless you share your personal scripts, no one else can access them. Your OneDrive settings control the shared access and permissions for all script **.osts** files, independent of any Excel settings. Scripts can't be linked from a local disk or custom cloud locations.
2121

@@ -25,7 +25,9 @@ Office Scripts that are saved to a SharePoint site are owned by your team. You a
2525

2626
To load a script from SharePoint, go to **All scripts** and select **View more scripts** at the bottom of the list. This brings up a file picker where you can choose **.osts** files from any SharePoint site to which you have access. Note that scripts from SharePoint that you've already opened will be displayed in the list of recent scripts.
2727

28-
To save a script to SharePoint, go to the **More options (…)** menu and select **Save as**. This opens a file picker where you can select folders in your SharePoint site. Saving to a new location creates a copy of the script at that location. The original version is still on your OneDrive or other SharePoint location.
28+
To move a script to SharePoint, open a script in the **Code Editor** and click on the script name, as if you're renaming it. In the callout, click the **Move** button. This opens a file picker. Select the destination folder in your SharePoint site. Moving the script to the new location can take up to a minute.
29+
30+
To save a copy of a script to SharePoint, go to the **More options (…)** menu and select **Save as**. This opens a file picker where you can select folders in your SharePoint site. Saving to a new location creates a copy of the script at that location. The original version is still on your OneDrive or other SharePoint location.
2931

3032
> [!IMPORTANT]
3133
> Scripts with [external calls](../develop/external-calls.md) can't be run from SharePoint. You'll receive an error saying "Network access calls are not supported at this time for scripts saved to a SharePoint site".

docs/resources/samples/add-image-to-workbook.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Add images to a workbook
33
description: Learn how to use Office Scripts to add an image to a workbook and copy it across sheets.
4-
ms.date: 07/12/2021
4+
ms.date: 04/20/2023
55
ms.localizationpriority: medium
66
---
77

@@ -49,6 +49,9 @@ function main(workbook: ExcelScript.Workbook)
4949

5050
## Sample code: Add an image from a URL to a workbook
5151

52+
> [IMPORTANT]
53+
> This sample won't work in Power Automate because of the [`fetch` call](../../develop/external-calls.md#external-calls-from-power-automate).
54+
5255
```TypeScript
5356
async function main(workbook: ExcelScript.Workbook) {
5457
// Fetch the image from a URL.

docs/testing/platform-limits.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Platform limits and requirements with Office Scripts
33
description: Resource limits and browser support for Office Scripts when used with Excel.
44
ms.topic: limits-and-quotas
5-
ms.date: 04/11/2023
5+
ms.date: 04/20/2023
66
ms.localizationpriority: medium
77
---
88

@@ -42,6 +42,22 @@ Additional Power Automate platform usage limitations can be found in the followi
4242
- [Limits and configuration in Power Automate](/power-automate/limits-and-config)
4343
- [Known issues and limitations for the Excel Online (Business) connector](/connectors/excelonlinebusiness/#known-issues-and-limitations)
4444

45+
## Power Automate specific restrictions
46+
47+
There are a few important differences between running a script in the Excel application and running a script as part of a Power Automate flow.
48+
49+
### No external calls from a script
50+
51+
[!INCLUDE [External calls in Power Automate](../includes/external-calls-power-automate.md)]
52+
53+
### API behavior differences
54+
55+
Some APIs behave differently when run with Power Automate. Others fail due to their reliance on the Excel UI. The full lists are found in [Troubleshoot Office Scripts running in Power Automate](power-automate-troubleshooting.md).
56+
57+
### ISO strict Open XML workbooks aren't supported
58+
59+
The **Excel Business (Online)** connector's **Run script** action doesn't support workbooks with the [ISO strict version of the Excel Workbook file format](https://www.loc.gov/preservation/digital/formats/fdd/fdd000401.shtml). Flows with this type of workbook return a "BadGateway" error when trying to run a script. This is due to coauthoring restrictions. Please save workbooks as the standard Excel Workbook format for use with Power Automate.
60+
4561
## Teams support
4662

4763
[!INCLUDE [Teams support note](../includes/teams-support-note.md)]

docs/testing/power-automate-troubleshooting.md

Lines changed: 3 additions & 7 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: 03/27/2023
5+
ms.date: 04/20/2023
66
ms.localizationpriority: medium
77
---
88

@@ -42,9 +42,9 @@ 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-
## Data refresh not supported in Power Automate
45+
## Refresh not supported in Power Automate
4646

47-
Office Scripts can't refresh data when run in Power Automate. 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 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.
4848

4949
### Script methods that do nothing when run in Power Automate flows
5050

@@ -86,10 +86,6 @@ There are two reasons that the parameters or returned data of a script are not a
8686

8787
The signature of a script is stored with the **Excel Business (Online)** connector when it is created. Remove the old connector and create a new one to get the latest parameters and return values for the **Run script** action.
8888

89-
## ISO strict Open XML workbooks aren't supported
90-
91-
The **Excel Business (Online)** connector's **Run script** action doesn't support workbooks with the [ISO strict version of the Excel Workbook file format](https://www.loc.gov/preservation/digital/formats/fdd/fdd000401.shtml). Flows with this type of workbook return a "BadGateway" error when trying to run a script. This is due to coauthoring restrictions. Please save workbooks as the standard Excel Workbook format for use with Power Automate.
92-
9389
## See also
9490

9591
- [Troubleshoot Office Scripts](troubleshooting.md)

0 commit comments

Comments
 (0)