Maximum length of File plus path name for excel workbooks

H

Hari Prasadh

Hi,

I will be programmatically opening / creating some Workbooks ,
renaming/giving names to them.

Considering that many of my Working folders / files are nested quite deep
and many times I come across problems (self-created!!).

1. A file + path name of 211 (up to and including 218) characters opens
just fine.

2. If I try rename the file in point 1. to a file + path name of 219
characters (which already exists on my computer - am overwriting on it) I
get the following message.

"The file could not be accessed. try one of the following:

Make sure the specified folder exists.
Make sure that the folder that contains the file is not read-only.
Make sure the file name does not contain any of the following characters: <
? [ ] : | or *
Make sure the file/path name doesnt contain more than 218 characters."

3. The below happens when I open a file + path name of 219 characters.

"'......\....\...long file name.xls' could not be found. check the spelling
of the file name, and verify that the file location is correct.

If you are trying to open the file from your list of most recently used
files on the menu, make sure that the file has not been renamed, moved or
deleted."

4. The below happens when I open a file/path Name with 256, 257 or more
characters (named manually).

"A DDE error has occurred, and a description of the error cannot be
displayed because it is too long. if the filename or path is too long, try
renaming the file or copying it to a different folder."

5. If am naming a file, I see that the maximum I can stretch to is up to 259
characters.

Please tell me as to whether there is any other constraints i should keep in
mind while programmatically working on long files (other than the 218
character limit).

Also, I would like to know whether there are any individual limits on file
name or path name.

Thanks a lot,
Hari
India
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top