Live data from Hacker News

Excel can't save to paths over 218 characters

support.microsoft.com

21–30 of 53 posts

Re: Excel can't save to paths over 218 characters

#22
post #18

Let me rant on something here. I work in finance, Excel is my everyday. We do a lot of manual monkey work (copy pasting stuff around a lot), when we "automate", we use the adamant (can't find a better word) VBA. Now, you see how not helpful is this error message? Ok, try that when you are writing a macro in VBA. You literally start regretting the day you were born. Nothing beats Python stack traces...

From that article, something I haven't seen before:

  To verify the error message that you receive in Excel 2007,
  press Ctrl+Shift+I. The following number is displayed in
  the lower-right corner of this error message dialog box:
  100202
It's no stack trace, but should be helpful in searching for proper error codes vs generic text.

Re: Excel can't save to paths over 218 characters

#23

Earlier quoted context omitted.

And even with tab completion that path shows why only a masochist with OCD thinks paths that long or deep are needed. People who name their folders "Documents and images from the conference in August with CEO" deserve what they get. Although 260 characters does seem like the Excel team think more like me than the rest of (more reasonable) MS.

> only a masochist with OCD thinks paths that long or deep are needed I'm surprised you can't imagine working on a path that deep. Path arrangements are frequently thrust upon you in work environments and if you have a lot of work (or a lot of people sharing the same folder hierarchy), you may need a deep path structure to keep it organized. Attacking people as "masochists" because their paths are difficult to type s…

I am pretty sure it's more for historical reasons than a solution from MS for long filenames on win32. It's due to the application writing to the file-system, not the OS.

Earlier DOS FS (and others) were sometimes limited to 8 characters + 3 for extension and Windows just used to shorten filenames when writing to those FS. But to these days it still causes some problems for legacy software and you might see some PROGRA~1 hanging around but it's not from the OS, it's from the application (or its old out-date API for FS access) doing the shortening to fit the long filename it was given into an 8 characters word it thinks the FS can handle.

Windows's file explorer or file picker doesn't shorten path or filenames when downloading long filename from the web for instance (via Firefox or IE).

Re: Excel can't save to paths over 218 characters

#24
post #17

When i first hard coded MAX_PATH in my program i though the length was reasonable. Now i think 1024 would be better as a really large file name does happen sometimes. Apple has a limit of 1024 apparently( correct me if I'm wrong ) Solution by microsoft: http://blogs.msdn.com/b/bclteam/archive/2007/02/13/long-path...

Setting an arbitrary limit is now and will always be the wrong thing to do in API design. MAX_PATH is one of the most persistent reminders of this problem.

Neither 260 chars on Windows nor 1024 chars on the Mac is an actual limit of the filesystem. Both Windows NTFS/FAT32 and Mac HFS+ can actually support thousands of nested folders.

But the "MAX_PATH" concept persists and a large number of programs will fail mysteriously when the limit is reached. Even though the filesystem supports vastly more, we are stuck with operating systems that encourage programmers to needlessly limit things. And there's never been a serious push to improve the situation. Long paths aren't a serious alternative since they're not supported by many common Windows APIs (plus, users get confused when \\?\ appears in front of everything). It's completely insane.

Re: Excel can't save to paths over 218 characters

#25

Ah.. the old 218 characters in your path problem! Because of course!

I'm pretty sure I said this exact same thing when my boss finally figured out that this issue was causing a script we use to fail on the BOMs I was trying to release. It took an embarrassing amount of time for a few engineers to figure that one out.

Re: Excel can't save to paths over 218 characters

#26
post #5

C:\not\sure\about\the\rest\of\you\but\i\needed\to\see\how\long\that\is\to\fully\understand\the\implications\of\this\seemingly\arbitrary\limitation\-\to\give\this\some\context\this\path\is\two\hundred\and\18\characters\

And even with tab completion that path shows why only a masochist with OCD thinks paths that long or deep are needed. People who name their folders "Documents and images from the conference in August with CEO" deserve what they get. Although 260 characters does seem like the Excel team think more like me than the rest of (more reasonable) MS.

Most people only type their pathnames occasionally and often use descriptive sentences to avoid confusion when clicking.

Re: Excel can't save to paths over 218 characters

#27
post #22
post #18

Let me rant on something here. I work in finance, Excel is my everyday. We do a lot of manual monkey work (copy pasting stuff around a lot), when we "automate", we use the adamant (can't find a better word) VBA. Now, you see how not helpful is this error message? Ok, try that when you are writing a macro in VBA. You literally start regretting the day you were born. Nothing beats Python stack traces...

From that article, something I haven't seen before: To verify the error message that you receive in Excel 2007, press Ctrl+Shift+I. The following number is displayed in the lower-right corner of this error message dialog box: 100202 It's no stack trace, but should be helpful in searching for proper error codes vs generic text.

Except I am on Excel 2003. The company is slowly moving to 201x although (can't remember the version, the email subject was "digital toolbox" and thus I directly deleted it).

Re: Excel can't save to paths over 218 characters

#29

Ah.. the old 218 characters in your path problem! Because of course!

My favorite experience with it was trying to deal with a zip file of "C:\Documents and Settings\" from an old computer that happened to contain multiple files whose paths were 255 characters long or so. You couldn't unzip it in a subdirectory of "C:\" because one of the resulting paths would be too long and cause the built-in zip program to crash/fail entirely. Using 7zip was the eventual solution.

On a related topic, do you know how difficult it is to search for files whose path are above a certain length on a fresh/default Windows setup? I eventually resorted to installing Python on it just to write a script to do it.

Re: Excel can't save to paths over 218 characters

#30
post #5

C:\not\sure\about\the\rest\of\you\but\i\needed\to\see\how\long\that\is\to\fully\understand\the\implications\of\this\seemingly\arbitrary\limitation\-\to\give\this\some\context\this\path\is\two\hundred\and\18\characters\

And even with tab completion that path shows why only a masochist with OCD thinks paths that long or deep are needed. People who name their folders "Documents and images from the conference in August with CEO" deserve what they get. Although 260 characters does seem like the Excel team think more like me than the rest of (more reasonable) MS.

Or someone who uses maven...
Post reply on HN