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/overview/script-storage.md
+8-31
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,26 @@
1
1
---
2
2
title: Office Scripts file storage and ownership
3
3
description: Information about how Office Scripts are stored in Microsoft OneDrive and transferred between owners.
4
-
ms.date: 01/10/2024
4
+
ms.date: 03/25/2025
5
5
ms.localizationpriority: medium
6
6
---
7
7
8
8
# Office Scripts file storage and ownership
9
9
10
-
The details of how scripts are stored and shared depend on your Microsoft 365 subscription. Select the relevant tab to learn more.
10
+
This article describes where Office Scripts are stored, how to share and restore deleted scripts, and how to track script usage in your organization.
11
11
12
12
> [!IMPORTANT]
13
13
> Office Scripts is in preview for personal and family Microsoft 365 subscriptions. If you encounter any issues, please report them through the Feedback button in Excel.
14
14
15
15
## File storage
16
16
17
-
# [For business and education](#tab/business)
18
-
19
17
Office Scripts are stored in your OneDrive by default. 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. Excel only recognizes and runs a script if it's in your OneDrive folder, a Sharepoint folder, or shared with the workbook. This means Excel needs internet connectivity to access Office Scripts.
20
18
19
+
> [!NOTE]
20
+
> For customers with personal and family subscriptions, your Office Scripts are moving from local storage to OneDrive. The legacy script storage location for personal and family subscriptions is the following folder in your local Office cache: `%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\`.
21
+
>
22
+
> New scripts are saved in your OneDrive, and any existing locally stored scripts will be moved to your OneDrive automatically.
23
+
21
24
### OneDrive
22
25
23
26
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.
@@ -40,16 +43,6 @@ To save a copy of a script to SharePoint, go to the **More options (…)** menu
40
43
> [!NOTE]
41
44
> Power Automate supports running scripts stored on SharePoint with the **Run script from SharePoint library (Preview)** action. This action is currently in preview and is subject to change based on feedback. If you encounter any issues with this action, please report them through the **Help** > **Give Feedback** option in Power Automate.
42
45
43
-
# [For personal and family](#tab/home)
44
-
45
-
Scripts are stored in your local Office cache. The cache is in the following folder.
46
-
47
-
```
48
-
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\
49
-
```
50
-
51
-
---
52
-
53
46
## Share scripts
54
47
55
48
# [For business and education](#tab/business)
@@ -67,34 +60,18 @@ Scripts can't be shared through workbooks with a home or family account. You can
67
60
68
61
## Restore deleted scripts
69
62
70
-
# [For business and education](#tab/business)
71
-
72
63
When you delete a script in Excel, it goes to your OneDrive or SharePoint recycle bin. To restore a deleted script, follow the steps listed in [How to recover missing, deleted or corrupted items in SharePoint and OneDrive for work or school](https://support.microsoft.com/office/3d748edf-c072-46c9-81a4-4989056ebc87). Restoring an **.osts** file returns it to the **All scripts** list.
73
64
74
65
A deleted script is unshared with the workbook. When you restore a script, it does **not** retain its script access. You will need to share the script again.
75
66
76
67
Restored scripts still work as expected with Power Automate flows. You don't need to recreate the flow connector.
77
68
78
-
# [For personal and family](#tab/home)
79
-
80
-
Office Scripts are deleted permanently when removed in Excel. This behavior will change before the feature leaves the preview phase.
81
-
82
-
---
83
-
84
69
## File ownership and retention
85
70
86
-
# [For business and education](#tab/business)
87
-
88
71
Office Scripts follow the retention and deletion policies specified by Microsoft OneDrive and Microsoft SharePoint. To learn how to handle scripts that were created and shared by a user being removed from your organization, see [Learn about retention for SharePoint and OneDrive](/microsoft-365/compliance/retention-policies-sharepoint?view=o365-worldwide&preserve-view=true).
89
72
90
73
During editing, files are temporarily stored in the browser. You must save the script before closing the Excel window to save it to the OneDrive location. Don't forget to save the file after edits, or else those edits will only be in the browser's version of the file.
91
74
92
-
# [For personal and family](#tab/home)
93
-
94
-
Clearing the Office cache will remove all your scripts. Be sure to manually save your scripts elsewhere if the cache needs to be cleared.
95
-
96
-
---
97
-
98
75
## Audit Office Scripts usage at the admin level
99
76
100
77
Discover who is using Office Scripts in your organization with the compliance center audit log. Details about the audit log are found in [Search the audit log in the Security & Compliance Center](/microsoft-365/compliance/search-the-audit-log-in-security-and-compliance?view=o365-worldwide&preserve-view=true#search-the-audit-log).
@@ -117,4 +94,4 @@ To specifically audit Office Scripts related activity as an admin, take the foll
117
94
-[Sharing Office Scripts in Excel](https://support.microsoft.com/office/226eddbc-3a44-4540-acfe-fccda3d1122b)
0 commit comments