Thursday, November 3, 2011

Excel opens, but the file doesn't

This problem sprang up out of nowhere on my XP laptop. All of a sudden, double-clicking an Excel document would open Excel, but not the file. It did not matter if the file was local or remote, if I accessed it via Explorer or not, or if another program (mail client, for instance) tried to call the file open command. Either way, I would be greeted with an empty Excel workbook. If I then chose File, Open, and browsed to my document it would then open it. Very frustrating, but I lived with it . . . until today . . .

I tracked down the problem to the file type associations in Windows XP. The resolution was quite simple once I knew what to do.
  • First, open any folder in Windows XP.
  • Click on the Tools menu, and choose Folder Options.   
  • From the dialog that pops up, click the File Types tab. You will now be presented with a list of all document types recognized by your computer. 
  • Scroll down to XLS, select it, and click the Advanced button. Now you'll see several "Actions" registered for Excel worksheets
                                                      
    • Usually, Open is the default (indicated by being in bold). Select "Open" and click the Edit button.

      • The main piece of data in here is the field labeled "Application used to perform action". This should point to your Excel executable, followed by some command-line arguments. Here's how it appears on my PC: "C:\Program Files\Microsoft Office\Office\EXCEL.EXE" /e "%1"
      • It is very important to make sure that the %1 is surrounded by quotes. %1 is the variable representing the full path and file name of the document you are opening. If it contains any spaces, and this is not surrounded by quotes you will get a flurry of weird errors.
      • "Use DDE" is normally checked. Now, make sure that "DDE Message" is empty. Click OK.
      • Click OK back at the Edit File Type dialog. Click Close on the Folder Options dialog.
      That should fix the problem. In my case, there was a malformed DDE Message in these properties. I have no idea how it got there, or what it should have been, but it works fine with it empty.

      No comments:

      Post a Comment