Excel and unique file names...



  • From Excel 2003 running XP...



    (I'd love to attach the screen shot, but it appears I am not allowed, perhaps because I just joined to share this. Here is the transcript of the message box.)



    "A document with the name 'Book1.xls' is already open. You cannot open two documents with the same name, even if the documents are in different folders.
    To open the second document, either close the document that's currently open, or rename one of the documents."



    This is going to make examining all these "Book1.xls" files a pain...



  • Evidently you missed the recent thread discussing the horror that is Excel. I first saw this error on the Windows Crash Gallery, and was dismayed years later to discover that it had never been fixed. You soon learn that Excel is different to every other MS product and every other product on any OS anywhere, with a disturbingly unique collection of bizarre limitations and absurd implementations. Someone did comment in the other thread that the latest version is improved, so there is there hope yet.



  • And yet, Excel is still one of Microsoft's best products.



  • @bstorer said:

    And yet, Excel is still one of Microsoft's best products.

    No it's not 



  • There's a reason for my naming convention: 

     Those are last year's files which I have to compare to this year's, but I can't have them both open so I had to change the filenames somehow.. 🙂



  • A quick tip:

    In Explorer, you can click the last Book1, shift + click the first Book1, and then hit F2 to rename the first one to something different than Book1.xls. You'll end up with:

    ExcelSucks.xls
    ExcelSucks (1).xls
    ExcelSucks (2).xls
    etc...

    Not the best-functioning batch renamer, but it's a quick way to be able to open all of those documents. After that, bestow upon whomever saved those damn files the wonders of file names.



  • This problem has been around for years and years. I am fairly sure it was a problem in Excel 97, and it may have been in prior versions as well.

    And yes, it is a true WTF. I can only imagine the code that is responsible for such a fiasco.



  • @boolean said:

    A quick tip:

    In Explorer, you can click the last Book1, shift + click the first Book1, and then hit F2 to rename the first one to something different than Book1.xls. You'll end up with:

    ExcelSucks.xls
    ExcelSucks (1).xls
    ExcelSucks (2).xls
    etc...

    Not the best-functioning batch renamer, but it's a quick way to be able to open all of those documents. After that, bestow upon whomever saved those damn files the wonders of file names.

    Fill me in here ... Select all contiguous files from Book1 to Book1? How can two files exist with the same name in the first place? Is this in Search Results only?

    I can't reproduce that in Win2k. I wrote my own RegEx batch rename tool but I've yet to bother making it auto-number files. One day ...



  • I see no WTF here.  This strikes me as a very polite way of saying:

    Don't be an idiot!  If your work is worth doing, it is also worth saving with a unique and meaningful file name.  If it wasn't worth doing, then close it, and start a new workbook.



     



  • @rjnewton said:

    I see no WTF here.  This strikes me as a very polite way of saying:

    Don't be an idiot!  If your work is worth doing, it is also worth saving with a unique and meaningful file name.  If it wasn't worth doing, then close it, and start a new workbook.

    Right, because there is no possibility of there ever being two files that share the same, correctly-chosen name. (When I saw that dialog, the files were most definitely not called Book1.xls) It's also acceptable to impose arbitrary restriction on users for no reason. That is why I despise Excel -- it is riddled with inconsistencies with other Office suite applications and the whole IT industry in general. If Microsoft feel that people are morons for ever having two files accessible to the Windows virtual file system with the same name, why can't they enforce this across the whole OS? No two taskbar buttons with the same name!

    It reminds me of the OS X Finder: there is no way to differentiate folder windows of identically-named folders. The Explorer address bar (and the title bar if you choose) lets you rapidly differentiate windows of folders with the same name by their full path. Far too often, I've been working with two folders with the same name in OS X and lose track of which window is which. It's especially fun in Exposé which, with its virtually non-deterministic layout algorithm, leaves you with very little way to figure out which window is which. The spatial relationship of the overlapping windows is lost in all-windows mode, and it doesn't even remain vaguely constant upon repeated uses of that mode (if windows are shown, hidden or resized in the intermediate period).

    Computers are supposed to work with us, not try their hardest to be as obstinate as they can. Human beings are already hard enough to handle, and we can't do a lot about those.




  • I see no WTF here.  This strikes me as a very polite way of saying:

    Don't
    be an idiot!  If your work is worth doing, it is also worth saving with
    a unique and meaningful file name.  If it wasn't worth doing, then
    close it, and start a new workbook.

    There is a WTF, because it doesn't pertain only to files named Book1.  For example: in my company, we have a template directory which is copied over for the start of each new project.  It contains various files, one of which is SOV.xls, which is the schedule of values for billing.  If you were to attempt to open SOV.xls from two different directories, it won't let you because they have the same name.  Somewhere internally Excel uses the filename as a key, when it really ought to use the full path + filename.



  • @bobday said:

    @bstorer said:

    And yet, Excel is still one of Microsoft's best products.

    No it's not 


    It actually is, and that's what's so sad.  What would you rank above it? 



  • CALC.Exe....

     

    None of the finalists wanted to replace it with their own implementation... 😉



  • @bstorer said:


    I see no WTF here.  This strikes me as a very polite way of saying:

    Don't
    be an idiot!  If your work is worth doing, it is also worth saving with
    a unique and meaningful file name.  If it wasn't worth doing, then
    close it, and start a new workbook.

    There is a WTF, because it doesn't pertain only to files named Book1.  For example: in my company, we have a template directory which is copied over for the start of each new project.  It contains various files, one of which is SOV.xls, which is the schedule of values for billing.  If you were to attempt to open SOV.xls from two different directories, it won't let you because they have the same name.  Somewhere internally Excel uses the filename as a key, when it really ought to use the full path + filename.

    I agree.

    I do a report on a whole bunch of data every 6 months. I keep the data organized in a nice directory structure, but the filenames of July's data and January's data have the same filenames. Which is fine, because they're in different folders. When I want to compare the old data to the new data, however, it won't let me. One solution would be to copy what I need from one, close it, and paste it in the other. But that doesn't work in Excel because it does stupid stuff with the Clipboard. So I'm forced to rename one of my files, do what I need, then name it back to the original name. I finally got fed up and started prepending "EXCELSUCKS" to all my previous-run filenames. Works like a charm.



  • @bstorer said:


    I see no WTF here.  This strikes me as a very polite way of saying:

    Don't
    be an idiot!  If your work is worth doing, it is also worth saving with
    a unique and meaningful file name.  If it wasn't worth doing, then
    close it, and start a new workbook.

    There is a WTF, because it doesn't pertain only to files named Book1.  For example: in my company, we have a template directory which is copied over for the start of each new project.  It contains various files, one of which is SOV.xls, which is the schedule of values for billing.  If you were to attempt to open SOV.xls from two different directories, it won't let you because they have the same name.  Somewhere internally Excel uses the filename as a key, when it really ought to use the full path + filename.

     

    Thanks for the background.  The OP didn't really provide much context.  I've encountered that error message once, but I don't really use Excel enough to be bothered by its oddities.  For me, it's mostly a way to get a quick view of CSV files while I'm porting them between other data formats.  I do agree that any decent software tool  should use the full path as a key if it is going to enforce unique views.



  • @Daniel Beardsmore said:

    It reminds me of the OS X Finder: there is no way to differentiate folder windows of identically-named folders.

    Command-click the folder name in the title bar.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.