Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can't find a proper *.exe for Excel in the usual places:

  • "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office
  • "c:\program files\microsoft office\office12\excel.exe"

Does anybody know where I would find the Excel executable for a Windows Vista machine? For that matter, also invoke Excel to open an existing *.xls file using a batch file?

Incidentally, the Shortcut for Excel shows "target:" to be

Microsoft Office Professional Hybrid 2007

share|improve this question
    
If your Windows install is 64-bit then Excel.exe will be in "<drive>:\Program Files (x86)\" –  Ƭᴇcʜιᴇ007 May 6 '11 at 16:56

2 Answers 2

up vote 2 down vote accepted

Just add this line to your batch file:

  • START "name of spreadsheet.xls"

This will use the default file association to open the file. If you need a specific version though, then you'll need to find the appropriate .EXE file which might be under a sub-directory called "Common" or "Common files" which should be somewhere under "C:/Program Files/" or "C:/Program Files (x86)/" (stuff is often scattered between both of these as applications are slowly transitioning from 32-bit to 64-bit).

Depending on the default file assocation will ensure that your batch file is portable, so you should prefer to use this approach if you can.

share|improve this answer
    
Both methods did the trick very nicely. Thank you! –  Rolnik May 6 '11 at 18:40
    
Note that if your file name needs quotes due to spaces or shell metacharacters, you'll need an empty set of quotes first: start "" "file name with spaces.xls" –  Joey May 11 '11 at 10:02
    
I note that invoking Microsoft Word occurs with the following string on my Vista 64-bit machine: "C:\Program Files (x86)\Microsoft Office\Office12\winword.exe" –  Rolnik May 11 '11 at 15:13

If you want to start excel on its own, you can use.

  Start Excel

You should be able to find the exact path by opening a command prompt and typing

 reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe"
share|improve this answer
    
This seems like a really good solution to me, which certainly also is in keeping with the spirit of being portable (although it may only be limited to use in Microsoft Windows, WINE, and possibly ReactOS.org since the Windows Registry is specific to a Microsoft environment). –  Randolf Richardson May 12 '11 at 1:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.