Problem: When trying to open a Microsoft Excel file stored in a SharePoint Online document library, I got this error message:
We couldn’t open that file. Rename the file to use a shorter name or copy it to a different folder with a shorter path.
We faced similar issues like: “Sorry, we couldn’t find <SharePoint-File-URL>. Is it possible it was moved, renamed, or deleted?”
“Cannot open the file because the full path of the file is too long. Please keep the full path less than 218 characters”
The file could not be accessed. Try one of the following:
- Make sure the specified folder exists.
- Make sure the folder that contains the file is not read-only.
- Make sure the file name does not contain any of the following characters: < > ? [ ] : | *.
- Make sure the file/path name doesn’t contain more than 218 characters.
This is because the maximum URL length of Excel files can’t exceed 218 characters! Although SharePoint Online supports up to 400 characters in URL (and you can open any Excel file with > 218 characters length in Excel Online!), Client-side Office Applications like Excel still have a limit of 218 characters.
So, If you try to open or save any file with URL > 218 characters, you may get this error! To resolve this issue, rename the file or folder or move the file to some other folder location so that the total length of the file would be lesser than 218 characters.
Please note, this limit applies to the full path of the URL in the encoded form! E.g., Any space characters (or special characters) are encoded with three characters as “%20”. So, the URL “https://crescent-my.sharepoint.com/personal/salaudeen_crescent_com/Shared Documents/Assets & Inventory.xlsx” will be calculated by encoding it as “https://crescent-my.sharepoint.com/personal/salaudeen_crescent_com/Shared%20Documents/Assets%20&%20Inventory.xlsx”.
Word, PowerPoint, and Access also have a similar limitation of 259 Characters. KB articles addressing this issue: