From 112043c03a4a8b103427361d63cc2fb7887a8dfe Mon Sep 17 00:00:00 2001 From: Alison McKay Date: Tue, 25 Mar 2025 17:28:41 -0700 Subject: [PATCH 1/4] [excel] (Storage) Update storage location for local to OneDrive migration --- docs/overview/script-storage.md | 45 +++++---------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/docs/overview/script-storage.md b/docs/overview/script-storage.md index 6e496b40..102d68cf 100644 --- a/docs/overview/script-storage.md +++ b/docs/overview/script-storage.md @@ -1,23 +1,24 @@ --- title: Office Scripts file storage and ownership description: Information about how Office Scripts are stored in Microsoft OneDrive and transferred between owners. -ms.date: 01/10/2024 +ms.date: 03/25/2025 ms.localizationpriority: medium --- # Office Scripts file storage and ownership -The details of how scripts are stored and shared depend on your Microsoft 365 subscription. Select the relevant tab to learn more. +This article describes where Office Scripts are stored, how to share and restore deleted scripts, and how to track script usage in your organization. > [!IMPORTANT] > 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. ## File storage -# [For business and education](#tab/business) - 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. +> [!NOTE] +> For customers with personal and family subscriptions, the Office Scripts storage location is 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\`. New scripts are saved in your OneDrive. + ### OneDrive 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,61 +41,27 @@ To save a copy of a script to SharePoint, go to the **More options (…)** menu > [!NOTE] > 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. -# [For personal and family](#tab/home) - -Scripts are stored in your local Office cache. The cache is in the following folder. - -``` -%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ -``` - ---- - ## Share scripts -# [For business and education](#tab/business) - To give users who are outside of the SharePoint site access to the script, [share the script with an Excel workbook](excel.md#share-office-scripts). This means you're linking the script with the file, not attaching it. Whoever has access to the Excel file will also be able to view, run, or make a copy of the script. > [!NOTE] > Admin settings for Conditional Access in OneDrive and SharePoint affect Office Scripts. For more information, see the [Conditional Access section of Platform limits and requirements with Office Scripts](../testing/platform-limits.md#conditional-access). -# [For personal and family](#tab/home) - -Scripts can't be shared through workbooks with a home or family account. You can manually share the code, but it's not possible to share a script in Excel or receive notifications when it has been changed or updated. - ---- - ## Restore deleted scripts -# [For business and education](#tab/business) - 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. 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. Restored scripts still work as expected with Power Automate flows. You don't need to recreate the flow connector. -# [For personal and family](#tab/home) - -Office Scripts are deleted permanently when removed in Excel. This behavior will change before the feature leaves the preview phase. - ---- - ## File ownership and retention -# [For business and education](#tab/business) - 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). 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. -# [For personal and family](#tab/home) - -Clearing the Office cache will remove all your scripts. Be sure to manually save your scripts elsewhere if the cache needs to be cleared. - ---- - ## Audit Office Scripts usage at the admin level 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 +84,4 @@ To specifically audit Office Scripts related activity as an admin, take the foll - [Sharing Office Scripts in Excel](https://support.microsoft.com/office/226eddbc-3a44-4540-acfe-fccda3d1122b) - [Troubleshooting Office Scripts](../testing/troubleshooting.md) - [Office Scripts settings in M365](/microsoft-365/admin/manage/manage-office-scripts-settings) -- [Undo the effects of Office Scripts](../testing/undo.md) +- [Undo the effects of Office Scripts](../testing/undo.md) \ No newline at end of file From 7e58313d5975cc0e0767b206d28f4840f53c86ce Mon Sep 17 00:00:00 2001 From: Alison McKay Date: Mon, 31 Mar 2025 15:20:04 -0700 Subject: [PATCH 2/4] Undo share scripts change --- docs/overview/script-storage.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/overview/script-storage.md b/docs/overview/script-storage.md index 102d68cf..e61c1216 100644 --- a/docs/overview/script-storage.md +++ b/docs/overview/script-storage.md @@ -43,11 +43,19 @@ To save a copy of a script to SharePoint, go to the **More options (…)** menu ## Share scripts +# [For business and education](#tab/business) + To give users who are outside of the SharePoint site access to the script, [share the script with an Excel workbook](excel.md#share-office-scripts). This means you're linking the script with the file, not attaching it. Whoever has access to the Excel file will also be able to view, run, or make a copy of the script. > [!NOTE] > Admin settings for Conditional Access in OneDrive and SharePoint affect Office Scripts. For more information, see the [Conditional Access section of Platform limits and requirements with Office Scripts](../testing/platform-limits.md#conditional-access). +# [For personal and family](#tab/home) + +Scripts can't be shared through workbooks with a home or family account. You can manually share the code, but it's not possible to share a script in Excel or receive notifications when it has been changed or updated. + +--- + ## Restore deleted scripts 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. From c3a0d107294a380f5dc812adef7793706ddfb0c3 Mon Sep 17 00:00:00 2001 From: Alison McKay Date: Mon, 31 Mar 2025 19:05:40 -0700 Subject: [PATCH 3/4] Incorporate eng feedback --- docs/overview/script-storage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/overview/script-storage.md b/docs/overview/script-storage.md index e61c1216..a7532774 100644 --- a/docs/overview/script-storage.md +++ b/docs/overview/script-storage.md @@ -17,7 +17,9 @@ This article describes where Office Scripts are stored, how to share and restore 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. > [!NOTE] -> For customers with personal and family subscriptions, the Office Scripts storage location is 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\`. New scripts are saved in your OneDrive. +> For customers with personal and family subscriptions, the Office Scripts storage location is 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\`. +> +> New scripts are saved in your OneDrive, and any existing locally stored scripts will be moved to your OneDrive automatically. ### OneDrive From 4f39357239aa49e41c58d6393c2238cf4ab9f8f6 Mon Sep 17 00:00:00 2001 From: Alison McKay Date: Tue, 1 Apr 2025 10:00:44 -0700 Subject: [PATCH 4/4] Update docs/overview/script-storage.md Co-authored-by: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com> --- docs/overview/script-storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/script-storage.md b/docs/overview/script-storage.md index a7532774..123137ce 100644 --- a/docs/overview/script-storage.md +++ b/docs/overview/script-storage.md @@ -17,7 +17,7 @@ This article describes where Office Scripts are stored, how to share and restore 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. > [!NOTE] -> For customers with personal and family subscriptions, the Office Scripts storage location is 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\`. +> 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\`. > > New scripts are saved in your OneDrive, and any existing locally stored scripts will be moved to your OneDrive automatically.