We can open Excel application from Run by executing the command ‘excel‘
However, ‘excel’ command does not work from command prompt. We need to use start to open excel application from command line.
To open a specific excel sheet from Run window you can use the below command.
Example: Open the data.xlsx file located in ‘Documents’ folder
If the file has whitespace in the name, then we can use double quotes as below.
excel "C:\Users\loginid\Documents\File with spaces.xlsx"
Other command line options for Excel application
Command for opening an excel sheet in read-only mode
excel /r fileName
Command for launching excel without opening a new blank document.
Change the ‘Save as’ folder foe excel files:
We can set a directory as the default location for saving excel files. Command for this is:
excel /p directory
For example to set D:\docs as the ‘save as‘ directory, the command is:
excel /p D:\docs
Launch excel in safe mode
All the above commands can be executed from command line by adding ‘start ‘ in the beginning of the command.