A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Dear @Heather Seeno,
Good day, and thank you for reaching out to the Q&A Forum. I understand that you would like to use an Office Script in Excel for the web across different workbooks without having to manually copy and paste the code each time. Since your colleague imports a new CSV each month, you are looking for a more efficient way for her to reuse the same script.
From my research, Office Scripts are stored in OneDrive by default, and they can also be stored in SharePoint, so they can be run on different workbooks and worksheets. Because of this, if your colleague already has access to the script in her script gallery, she should be able to reuse the same script on each newly imported workbook without having to recreate it manually. She can go to Automate > View Scripts > Recent Scripts, locate the script, and then run it on the new workbook.
If your colleague does not have access to the script yet, you can also share it with her by doing the following:
- Open the workbook that contains the script in Excel for the web.
- Go to Automate > View Scripts.
- Find the script you want to share to open it in the Office Scripts pane.
- Select the three dots next to the script, then choose Make a copy.
- Choose a SharePoint folder that both you and your colleague can access.
- Select Save.
However, this requires an active Microsoft 365 subscription with an eligible commercial or educational license that includes access to the Microsoft 365 Office desktop apps. If your colleague does not have an eligible license and is using only the web version without Office Scripts support, the script feature may not be available for normal cloud-based reuse. In that situation, manually copying and pasting the script code may be the most practical workaround.
For reference: Sharing Office Scripts in Excel - Microsoft Support
I hope this information helps clarify the situation and provides you with workable solutions. Should you have any further questions or need additional assistance, please don't hesitate to reach out. I'm always here to help. Have a wonderful day!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.