Skip to content

Commit 9f80b89

Browse files
[excel] (Power Automate) Add information about scheduling a script through the Excel client (#702)
* Add information about scheduling a script through the Excel client * Address PR feedback about editing flows * Apply suggestions from code review Co-authored-by: Alison McKay <[email protected]> --------- Co-authored-by: Alison McKay <[email protected]>
1 parent 5a6b63d commit 9f80b89

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

docs/develop/power-automate-integration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Run Office Scripts with Power Automate
33
description: How to get Office Scripts for Excel working with a Power Automate workflow.
44
ms.topic: integration
5-
ms.date: 11/29/2023
5+
ms.date: 01/19/2024
66
ms.localizationpriority: medium
77
---
88

@@ -12,6 +12,9 @@ ms.localizationpriority: medium
1212

1313
[!INCLUDE [Power Automate needs a business license](../includes/power-automate-needs-business.md)]
1414

15+
> [!TIP]
16+
> Looking to automatically run a script without connecting to other apps? Use the [Script scheduling](../overview/excel.md#schedule-scripts-to-run-automatically) feature.
17+
1518
## Get started
1619

1720
If you are new to Power Automate, we recommend visiting [Get started with Power Automate](/power-automate/getting-started). There, you can learn more about all the automation possibilities available to you. The documents here focus on how Office Scripts work with Power Automate and how that can help improve your Excel experience.

docs/images/schedule-a-script.png

10.5 KB
Loading

docs/overview/excel.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Office Scripts in Excel
33
description: A brief introduction to the Action Recorder and Code Editor for Office Scripts.
44
ms.topic: overview
5-
ms.date: 12/22/2023
5+
ms.date: 01/19/2024
66
ms.localizationpriority: high
77
---
88

@@ -54,6 +54,14 @@ Add buttons that run scripts to help your colleagues discover your valuable solu
5454
> [!NOTE]
5555
> Learn more about how scripts are stored in your OneDrive in [Office Scripts file storage and ownership](script-storage.md).
5656
57+
## Schedule scripts to run automatically
58+
59+
Set your scripts to run every day and keep your workbook up-to-date. Once you have your script, you can set it to automatically run on the workbook at regular intervals. A behind-the-scenes Power Automate flow ensures everything happens, even when the workbook is closed.
60+
61+
To schedule a script, open the script in the Code Editor. Open the **Script scheduling** section and complete the sign in process to Excel through Power Automate. Set how often you want the script to run and select **Create flow** to begin.
62+
63+
:::image type="content" source="../images/schedule-a-script.png" alt-text="The Code Editor task pane that shows the recurrence interval options for scheduling a script.":::
64+
5765
## Connect Office Scripts to Power Automate
5866

5967
[Power Automate](https://make.powerautomate.com/) is a service that helps you create automated workflows between multiple apps and services. Office Scripts can be used in these workflows, giving you control of your scripts outside of the workbook. You can run your scripts on a schedule, trigger them in response to emails, and much more. Visit the [Run Office Scripts with Power Automate](../tutorials/excel-power-automate-manual.md) tutorial to learn the basics of connecting these automation services.

docs/testing/troubleshooting.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshoot Office Scripts
33
description: Debugging tips and techniques for Office Scripts, as well as help resources.
44
ms.topic: troubleshooting-general
5-
ms.date: 12/22/2023
5+
ms.date: 01/19/2024
66
ms.localizationpriority: medium
77
---
88

@@ -86,6 +86,14 @@ The following steps should help troubleshoot any problems related to the **Autom
8686
> [!NOTE]
8787
> There is a known issue that prevents scripts stored in SharePoint from always appearing in the recently used list. This occurs when your admin turns off Exchange Web Services (EWS). Your SharePoint-based scripts are still accessible and usable through the file dialog.
8888
89+
## Problems scheduling a script
90+
91+
Scheduling a script requires a business license for Microsoft 365. This is needed for the Power Automate flow that powers the scheduled script. Errors from this flow are shown when there are problems scheduling. You may need to manually update your flow in [Power Automate](https://make.powerautomate.com), where it will be listed under **My flows**.
92+
93+
The following list shows common errors you might encounter.
94+
95+
- **The access token expiry UTC time is earlier than current UTC time.**: Too much time has passed between signing into the service and scheduling the script. Reopen the script in the Code Editor and try to schedule again.
96+
8997
## Help resources
9098

9199
[Stack Overflow](https://stackoverflow.com/questions/tagged/office-scripts) is a community of developers willing to help with coding problems. Often, you'll be able to find the solution to your problem through a quick Stack Overflow search. If not, ask your question and tag it with the "office-scripts" tag. Be sure to mention you're creating an Office *Script*, not an Office *Add-in*.

0 commit comments

Comments
 (0)