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
Answer
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.
Comments
Post a Comment