How to Stop OneNote from Adding Numbers to Excel File Names
Question details
The user wants to prevent OneNote from automatically adding numbers to Excel file attachment names when reopening them, which breaks macro references.

- Product
- Microsoft OneNote, Microsoft Excel
- Device & OS
- not provided
- Scenario
- Reopening an Excel spreadsheet attachment directly from a OneNote page.
- Observed behavior
- OneNote creates duplicate file names with appended numbers (e.g., File(1).xlsx), subsequently breaking macro references to templates.
Before proceeding, ensure your Excel file is saved and synced to a cloud storage service like OneDrive or SharePoint, as you will need a web link to create a live view.
Embed an Excel Live View Link in OneNote
Replacing the static file attachment with a live web link prevents OneNote from duplicating and renaming the file in its local cache.
When you attach a physical file to OneNote, opening it extracts a copy to your local temp folder. Doing this multiple times causes Windows to append numbers to avoid overwriting. By using a live cloud link instead, OneNote embeds a live view that connects directly to the original file, avoiding duplicates entirely.
Ensure your Excel spreadsheet is uploaded and saved to a cloud service such as OneDrive or SharePoint.
Open the Excel file in your web browser, click on the 'Share' button in the top right corner, and copy the shareable web link to your clipboard.
Navigate back to your target OneNote page, click on the canvas where you want the file to appear, and paste the copied link (Ctrl + V).
OneNote will automatically render the link as a live, interactive view. You can now synchronize changes, resize the spreadsheet window, and even apply data filters directly within OneNote.

Try WPS Office for Seamless Spreadsheet Management
If you are frustrated by software quirks like OneNote continually duplicating and renaming your Excel attachments, consider switching to WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative for managing all your files without messy local caching issues.
- 1. Download the software: Visit the official WPS website and download the free WPS Office installation package for your operating system.
- 2. Install WPS Office: Run the installer and follow the simple on-screen instructions to set up the suite on your device.
- 3. Open your spreadsheets: Launch WPS Spreadsheets and easily open your existing .xlsx files with full formatting and macro support intact.

Frequently Asked Questions
Why does OneNote add numbers to my Excel attachments?
When you open an attachment in OneNote, it temporarily saves the file to a local cache folder. If you open it multiple times, OneNote creates new copies with appended numbers (e.g., File(1).xlsx) to avoid overwriting the previous cache, which ultimately breaks macro references relying on exact names.
Can I edit an Excel attachment in OneNote without breaking macros?
If you use the traditional file attachment method, macros linking to specific file names may break due to OneNote's automatic renaming. Using a live web link instead ensures the file name remains constant and macros function properly.
Does pasting a browser link in OneNote work for offline files?
No, pasting a browser link requires the Excel file to be hosted on a cloud service like OneDrive or SharePoint. Offline files must first be uploaded to the cloud before you can generate a shareable web link to create a live view.




