Increase the 218 character filename length limit to open files in excel
Excel can't open files with full path lengths greater than 218 characters as documented in https://support.microsoft.com/en-us/kb/213983. This is still a problem in Office 2016. It seems crazy that Excel can't open a valid file that the filesystem allows. People have been complaining about this since Office 2000. The thread below has over 11 thousand views and there are plenty others. Please fix this. http://answers.microsoft.com/en-us/office/forum/office_2013_release-excel/sorry-unable-to-find/595333d0-1463-499f-967e-4da8ac2e2047
I am excited to announce that we have completed the work to enable longer file name and paths in Excel for desktop. This was a significant change that required work on multiple parts of the product beyond open and save, since the file path is used in other features like external links.
Before this change, Excel for desktop could open and save files with a full path length of up to 218 characters.
Starting a few weeks ago, all Office 365 users in the monthly channel (CC – current channel, build 12624.20466 or above) are able to open and save files up to 2034 characters. However, in practice there are lower limits imposed by the file system:
- Windows local and UNC files: 260 characters
- OneDrive/SharePoint files synced to the local drive: 260 characters
- OneDrive/SharePoint files opened directly from the cloud: 400 characters
Thanks again for your continued feedback.
David [Microsoft Excel Team]
Now what about the same for Word and powerpoint?
We tested very interesting issue about this.
We have at company office 2019 Volume licence 1808-10373.20050
Then When We try to open Excel from on prem sharepoint with path lenth 290 character its gave attached error.
But then We installed second computer and installed office 2019 Retail 2008- 13127.20616 Same Excel with same length works !!!!
Please tell me some kind of Logical thinks.
True Rock commented
All of my tests are performed in my local OneDrive folder:
I have the registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled (Type: REG_DWORD) set to 1.
Also, I have enabled "Win32 long paths" in the Local Group Policy Editor:
Win32 long paths
I rebooted my PC after performing the above.
The longest PATH NAME that Windows 10 Pro 64-bit File Explorer can handle is 259 characters:
If I try to rename the above file to a name one character longer, Windows 10 File Explorer rings the Windows 10 error bell.
If I drag and drop that 259 character path-file, File Explorer truncates the path-file name to 249 characters.
But, I can edit the file with Windows 10 Notepad and "Save As" with a PATH NAME that is 271 characters long.
I assume I could "Save As" a much longer file name.
Excel can open a file with a PATH NAME up to 247 characters long.
Excel will display an error dialog box that the FILE NAME can be no longer than 207 characters long.
Marius De Kock commented
What about office 2019? will you just leave us unserved and unable to complete the most basic task... Save a file?
You may have solved the problem, but you are still displaying this limitation in the message box.
Is there any good reason for not allowing some of the special characters?
It seems that Excel is capable of loading a file with special characters (brackets  in my case), but doesn't seem to be capable of saving a PDF file with the same name.
What is long path tool???
can it help or fix this problem?
Any chance the Word version of this error can get some love? Major issue for us and out clients.
@Roy thanks. Excel might support long path names now but everything else that the users use (like the File Explorer) seems still restricted to 260 which doesn’t help anyone :/
I have Build 13029.20344 so definitely later than the build "David" refers to as the starting Build to have the new abilities.
However, my File|Save As dialog box will only physically permit EXACTLY 259 characters. And even filled to its limit, it won't process that name.
Tells me it can't save it becauise the filename, directory name, or volume label syntax is incorrect. Untrue, of course, but that's the message.
At exactly 250 characters, that changes to a different message box and the dialog box even reacts differently after acknowlodging it... It becomes you can't save here, please choose another location.
Clearly, after reaching 250, it's adding in path length and having an issue. But it won't even consider other factors above 250.
At 200, it saves. I did not test further to see where, between 210 and 216 it was willing, but somewhere there. Path length is 47 characters, plus the five for .xlsx, so that's 262 total, or a wee more... perhaps the 260 he talks about though why higher, not exactly or slightly lower?
So for SAVING, LongPathsEnabled seems to get me nothing. The increase "David" mentions, to 260, seems to be all I get.
Opening though... I can't tell. Somehow, now, and not months ago, all the really long filenames I try get truncated. I did an 800.3 filename then and had the same kind of varied result I;'m having today. I got the length because after getting the file system to take the name, I did another rename and copied out the name, then put it into Excel and did LEN(). Wasn't hand counting 800 characters.
But today, all I get is 183 or so characters. Renaming simply truncates the paste at that. Another 58 characters for path, 5 more for .xlsx, and I have perhaps 246 characters: because even Windows won't let this work. Which is likely what "David" was referring to.
Side note: I have that little down arrow too.
I'm thinking something strange and different is afoot given that Explorer is what was truncating the file renames, not Excel. I no longer believe LPE is enabled enough to work. So I have nothing further at the moment to add, helpwise. I'll see where further investigation takes me, but... I don't expect happiness at the end of this tunnel.
@Roy - I still get the error opening a filepath with 273 chars
Yes, there is an additional step:
"Enable Win32 long paths" in the Local Group Policy Editor
Do this by clicking the "Start" button (I'll call it that until death I suppose, whatever MS calls it currently) in the lower left corner of the screen (usually), type "gpedit", and open it when done typing.
(I have seen the internet say the editor is only available in Windows 10 Pro. When wanting to do it, I feared I would have to involve IT and argue for it, but it works from here and doesn't even require Administrator priveleges, or opens with them by default.)
Once open, navigate to: (double-click on)
1. Computer configuration (in the tree on the left)
2. Administrative Templates (over in the working area to the right)
In Filesystem you will see "Enable Win32 long paths" — click on it and enable it.
I have attached a screenshot of the point at which you select it.
While there anyway, you might want to navigate about some other options. I found a couple that were hard to interpret without thinking that ALL my efforts at using privacy options in Windows provided software, including IE, had always been worthless because the settings here were not enabled. That they provided the fiction that you were protecting yourself but because you never knew to come here, nothing much actually took place outside some (ineffective) things like deleting cookies and such.
Anyway, without doing this step with "gpeditor" the Registry entry will do no good. It seems.
I am still getting the error even I updated to the latest CC update channel. I enabled Longfilepath reg key in windows 10. Am I missing something???
Does this new limit of 2034 characters apply also for the 32 bit version of Excel in Office 365 build 12624.20466 or above
By using Long Path Tool, I fixed windows files issue
Michael Durand's comment spurred a search on my part that must have been different from my previous searches 'cause I came across a Microsoft document on the subject that did not say it as a particular point, but did talk about Windows API32 and Shell limits now being whichever setting you have, either out-of-the-box (=260 characters) or the NTFS limit now possible in Windows (=32767 characters) settings, for MAX_PATH length.
It also talked about UNC aspects, including some limitations and behaviors, and the two pieces together give me the impression that "David" (when he states the first limitation in his comment above) means exactly this, essentially the MAX_PATH length, and so:
1) IF you have set your system for the 32767 limit, and
2) IF the program of interest is manifested (and includes a statement allowing the longer paths — just being manifested is not enough),
then the limit "David" mentions should be 32767 characters, not 260 characters.
However, even if you set your system and the program is manifested with the statement for this, you could STILL run into issues depending upon how it actually interacts with the file system for each kind of interaction. If it interacts for whatever via the Shell, it could limit that interaction to just the 260 character limit, although other places I've searched say that the Shell started being able to accept the MAX_PATH length sometime in 2016, though no one talks about the "except's" that probably exist. However, any new program ought to (you know, you really wish this were so, right, since it means people are just stupid if not so) perform all tasks consistent with the longer paths so long as it also allows them in general. But older programs, like Excel, might have lots of un-modernized code so...
Also, the document included the point, not emphasized, just included, that the filename itself, irrespective of any allowable total path length, cannot be longer than exactly 260 characters. So while your PATH can be VERY long, the filename itself, cannot be. Not usually a problem for our needs HERE, but good to know. Also, regardless of your path's allowed length, but particularly for the short, default, setting of 260 characters (256 plus some "faux" bytes), you CANNOT use so many characters in the PATH portion that you end up with less than exactly 12 ("8.3") characters left for use by the filename (even if the filename is actually shorter than that). Seems a good chance many refusals by Excel that are bizarre-seeming could be subject to this.
(I'm still imagining the second and third limits he mentions are really One Drive and SharePoint limits, not really Excel's although Excel might enforce them to avoid nasty surprises for users. Of course... who knows, right?)
Well, all that, and still... if it were so, why would they be cagey about it instead of braying it about everywhere? So...
Michael Durand commented
Thank you ; anyway the limitatino on Windows local files is not really an Operating system limitation, becasuse there are all the functions in the Windows SDK to access files with very long path... It is mostly a matter of adapting the Office suite to use these functions... In the meantime, this limitation is so frustrating...
Actually, that link below is a good thing. Used to be the fully resolved path was the length but now it looks like OneDrive and SahrePoint only go back to the URL.
When he says "Windows local and UNC files: 260 characters" is only being enforced by the file system, NOT by Excel itself, that's also good because you can increase the file system's limit to 32,767 characters. I bet there's a far lower limit still hard-coded into Excel that is much, much lower than that but still it's something more.
They cannot have done more than cosmetic change, like suppress Excel evaluating the length and refusing before ever presenting to the file system. So chances are there are secondary limits they will only be finding out about from people complaining (certainly not from analyzing code from 37-38 years ago). So people need to experiment! And complain! I mean, report their findings. Sadly, for MS, that is the same thing as no other avenue is available to most.
Regarding your stated limits for "Windows local and UNC files", is this only individual filename or foldernames, or does this limit apply to the total file path?
The link below seems to indicate that the 260 limit applies to individual foldername and filenames, whereas the full path limit is 400.
Raju Alluri commented
When we save the file system dont give us any errors and when we download the file it does, its so frustrating that we already have multiple nested folder and user saved the links as favorites. Now restructuring the folder by manually calculating the url limit is not the reality. Microsoft should come up with some kind of workaround by shortening the URL if its crosses the said limit.
Does anyone know when this will be fixed in the semi annual channels?