Fix Excel File Path Exceeds 259 Characters in OneDrive
Question details
The user cannot open or save an Excel file in a locally synchronized OneDrive or SharePoint folder because the file path exceeds the 259-character limit, despite having Windows long-path support enabled.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- Windows
- Scenario
- Accessing or saving deeply nested Excel workbooks in locally synced OneDrive or SharePoint directories.
- Observed behavior
- Excel displays an error preventing the opening or saving of the file, ignoring the OS-level long path setting due to local synchronization limitations.
Before proceeding, check your folder structure to identify if an excessively long organization name in your OneDrive root folder is contributing to the path length.
Shorten File Names and Folder Hierarchy
This is the most direct way to bypass the 259-character limitation for locally synchronized files.
Because Office applications and local sync clients still rely on legacy path limits, reducing the total character count of your directories and file names ensures your workbooks remain accessible on all devices.
Open Windows File Explorer and locate your locally synchronized OneDrive or SharePoint directory.
Right-click on any deeply nested folders, select 'Rename', and shorten the names using acronyms or abbreviations.
Drag and drop the Excel workbook to a higher-level directory closer to the root drive (e.g., directly under the main OneDrive folder) to drastically reduce the absolute path length.

Open the File Directly from SharePoint or OneDrive Online
Use this method if you cannot alter the folder structure and need immediate access to the file.
Try WPS Office for a Seamless Spreadsheet Experience
If you are frustrated by Microsoft Excel's persistent file path limits and synchronization issues, consider switching to WPS Office. It provides a highly compatible, lightweight alternative for viewing and editing your spreadsheets without the bloat.
- 1. Download the software: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
- 3. Open your spreadsheets: Launch WPS Spreadsheets and open your existing files instantly; your formatting and formulas will remain intact.

Frequently Asked Questions
Why doesn't enabling Windows long path support fix this issue in Excel?
Microsoft Office applications and the OneDrive sync client still utilize legacy API structures for local synchronization. These hardcoded limits cap local paths at 259 characters, which overrides the OS-level long path settings.
What exactly is included in the 259-character path limit?
The limit accounts for the entire absolute path. This includes the drive letter (e.g., C:\), all folder names, spaces, backslashes, the actual file name, and the file extension (e.g., .xlsx).
Does SharePoint Online have a different file path limit?
Yes, when accessed directly via a web browser, SharePoint Online and OneDrive for Business support file paths up to 400 characters. This is why opening the file online is an effective workaround.




