Excel Filename Is Too Long

Written by Allen Wyatt (last updated September 9, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Malay uses Excel almost every day. From time to time, Excel refuses to open a workbook stored on a network drive. Malay receives a message that the file path is too long, or the filename is too long. However, he notes that the same file opens easily if he brings it to the desktop. Malay wonders why this happens.

This problem is due to the length of the actual filename (duh!), but what actually counts towards that length? It is every character (including slashes, quote marks, and spaces) that are include in both the path and filename. Since network paths can be quite a bit longer than local paths (on your hard drive), it is easy to run into the length limit. This problem is explained quite exhaustively at this Microsoft site:

https://support.microsoft.com/en-us/topic/951229f3-dc14-980f-765e-224e4fdc7331

This article is noted as being for Excel 2010, but it is still very much applicable to other versions of Excel. This is because the issue is with Windows, not with Excel itself.

There are a few potential solutions you can pursue. First, you can simply move the workbook to your desktop, as Malay did. There the path will be shorter, and things will work out just fine. When you are done, you can then move the workbook back onto the network.

Another possible solution is to add a mapping, within Windows, to your network drive. Actually, you'll want to map to a network path. So, for instance, let's say your workbooks are within a network drive such as the following:

\\server\Charleston\working\share\ExcelData\working\docs\

You could map that path to a drive on your system (such as X: or Y:) so that you can refer to any folders or files in that path simply by using the mapped drive letter. This means that your references to the workbooks would be much shorter and, therefore, not run afoul of the length limit. You can get the general idea on how to do the mapping by referring to either of these pages:

https://windows.tips.net/T011898_Mapping_a_Network_Drive.html
https://support.microsoft.com/en-us/windows/29ce55d1-34e3-a7e2-4801-131475f9557d

Still another solution is to edit the Registry, in Windows, so that you can use longer filenames. This approach takes a bit more explaining, and rather than do so here, I'll simply direct you to a good explanation that can be found at the How To Geek website:

https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/

The one potential gotcha related to this approach is that it may cause some compatibility problems with older 32-bit applications. (Not Excel; you should have no problem with it.) If you don't use any 32-bit software or simply have a strong need for very long file paths, this tweak should help.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13911) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Ctrl+V Pasting is Flakey

When you copy and paste a formula, you usually want to see the formula where you pasted. If you don't get the formula, ...

Discover More

Drawing Borders

Adding borders around cells is a common formatting task. You can make the task more intuitive by actually drawing the ...

Discover More

Printing Multiple Label Copies when Merging

Need to print more than one copy of mail-merge labels? There are a number of different approaches you can take to getting ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Comma-Delimited and MS-DOS CSV Variations

Excel provides different file formats you can use to export your worksheet information. One such file format is CSV, or ...

Discover More

Use Filenames that Sort Properly

When storing your Excel workbook, you need to specify a file name to be used for the workbook. Take a moment to consider ...

Discover More

Specifying the Number of MRU Files

MRU (most recently used) files can be a great help when you work with a given set of common workbooks. Excel allows you ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.