How (and Why) to Start Microsoft Excel from the Command Prompt
You can open Microsoft Excel from the Command Prompt and you can also add additional parameters to the command to do things like open Excel with a specific template or start Excel in safe troubleshooting mode.
Start Excel with Command Prompt
There are many ways to start Excel using the Command Prompt, but if you want to start Excel in its normal state (that is, the same way Excel starts when you click the shortcut), there are two different ways to do that: to do.
Command Prompt opens. Type this command and press Enter to start Excel:
Excel should start immediately.
Another way to open Excel is to locate the folder containing the excel.exe file, navigate to that folder in the command prompt, and then run a simple command.
To find the excel.exe file, you must be located in the Program Files folder in the Command Prompt. You can use the cd command to change the directory. In the command prompt, type this command and then press Enter:
You are now in the Program Files folder. Next, you need to find out in which folder the excel.exe file is located. To do this, run this command:
dir excel.exe /s
The directory of the excel.exe file is returned.
Now that you know the folder where excel.exe is located, navigate to that folder. Since we are already in the Program Files folder, we can omit that from the next command. In our example, we would run this command:
cd Microsoft Office\root\Office16
Now that you are in the correct folder, all you need to do is type Excel in the Command Prompt and press Enter.
Excel will now open. However, the main purpose of starting Excel from the Command Prompt is that you can control how it opens, and you do that by adding the various switches and parameters available to the command.
Here is a list of command switches provided by the official Microsoft Office support site. Add it to the end of the start Excel command in the Command Prompt.
Switch and parameter description:
workbook path | file name
No switch is needed.
Opens the target file.
start excel “c:\Sample folder\filename1.xlsx”
start excel http://MySite/filename1.xlsx
/r working directory path | file name
Opens the destination workbook as read-only.
start excel /r “c:\Example Folder\file_name1.xlsx”
start excel /r http://MySite/filename1.xlsx
/t workbook path | file name
You can also use /n instead of /t to achieve the same result.
Opens the target file as a template.
start excel /t “c:\Example Folder\file_name1.xlsx”
start excel /t http://MySite/filename1.xlsx
/e or /integrate
Prevents the Excel splash screen from appearing and a new blank workbook from opening.
/s or /safe mode
Start Excel in safe mode. Launches Excel without additional add-ins, templates, or other customizations. It is helpful in solving problems in Excel.
Creates a new workbook that contains one XLM macro sheet.
Loads the Automation plug-in specified by the plug-in progID.
run excel /a MyProgId.MyProgID2.1
Start a separate process from Excel.
These commands allow you to open Excel in several ways.
Excel isn’t the only Office program you can open with Command Prompt, you can also use it to launch Microsoft Word and PowerPoint. The commands may vary by application, so research what options are available for each application.