File name too long in Microsoft Excel 2008?

I've got Microsoft Office 2008 for Mac and I'm a heavy Excel user. I'm frequently getting an error message stating that the file path I'm specifying when creating a new file is too long. I'm convinced that earlier versions of OSX didn't produce this error, or at least worked better. I'm running OSX 10.11.4, but I've suffered with this problem for some time. I've read other comments stating that there may be a 259-character limit for the file and path name.


My question: Can anyone tell me if this path length limitation has been removed or at least liberalized in the latest Excel version? It would be worth an upgrade just to get rid of this nasty problem.


Thanks...

iMac, OS X El Capitan (10.11)

Posted on May 9, 2016 5:58 PM

Reply
8 replies

May 10, 2016 7:06 AM in response to Joe X. Jones

The Mac operating system has supported very long file paths for eons. Microsoft however even though Office for Mac is of course running on top of the Mac operating system has had this problem also for eons. My own experience shows Office 2011 for Mac also had/has this problem.


Note: HFS+ the disk format predominantly used with Macs has a maximum file name limit of 255 characters, the entire file path can be much, much longer. See OS X: Cross-platform filename best practices and conventions - Apple Support . I believe for properly written programs i.e. not Microsoft and certainly not Adobe then the limit would be be well over a thousand characters for the entire file path. In fact it seems that while the file path limit for OS X might semi-officially be 1024 characters it is actually in reality essentially unlimited. See the following article for some highly detail information about this including comparison to other operating systems. You will see that Windows has a relatively feeble limit of 260 characters and perhaps this is why Office for Mac artificially limits its file path limit to such a low level even though it does not make sense to do so on a Mac.


http://insanecoding.blogspot.co.uk/2007/11/pathmax-simply-isnt.html


I have not bothered upgrading (nee. downgrading 😉) to Office 2016 for Mac so I cannot confirm whether it still has this problem.

May 10, 2016 7:30 AM in response to Joe X. Jones

The file name limit in Excel (I'm testing with Office 2016) still seems to be the same as it has been in Windows since Win '95. It's 256 characters, which includes the path name.


I created a quick dummy file and tried saving it to the desktop. First with a ridiculously long name with over 3,000 characters. I kept whittling it down until Excel stopped telling me the file name was invalid. I only used alpha characters and numbers so the message couldn't be due to known invalid characters such as / : \ and some others.


It finally saved when the total was 256 characters. So the name was:


~/Desktop/xxx.xls


With the xxx being a long string of text so xxx.xls totaled 256 with ~/Desktop/ added in.

May 10, 2016 8:40 AM in response to Kurt Lang

Thanks for the useful information and ideas. My file name was pretty short - it was the long path name that was causing my error. By successively shortening certain folder names in the file path, I was able to get Excel to open the file without error when the file path was reduced to somewhere in the 250 character range. (I don't have the precise number; it may very well be 256.) I've got many other files of different types in the same folder and their parent apps handle them without error, so it is Excel that is the weak link.


Kurt, you mentioned that the file name limit in Excel 2016 is 256. Do you have any idea if their is a path name limit as well? I can easily live with a file name of 256 characters or less, but this path length limitation is killing me.


Thanks.

May 10, 2016 9:39 AM in response to Joe X. Jones

Yes, as mentioned above, the path is part of that 256 character limit. So in my example above, ~/Desktop/ is 10 characters, and Excel refused to save the file until I had the name down to 246 characters, of which .xls counts as 4.


Luckily, Excel didn't seem to count the true, full path against me. Which should have been (as far as Unix is concerned);


/Volumes/El Capitan/Users/my-user-account-name/Desktop/xxx.xls

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

File name too long in Microsoft Excel 2008?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.