≡ Menu

Run command for Excel

We can open Excel application from Run by executing the command ‘excel
Run command for excel and excel command line options
However, ‘excel’ command does not work from command prompt. We need to use start to open excel application from command line.

start excel

To open a specific excel sheet from Run window you can use the below command.

excel fileName

Example: Open the data.xlsx file located in ‘Documents’ folder

excel c:\Users\loginid\Documents\data.xlsx

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.

excel /e

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

excel /s


excel /safemode

All the above commands can be executed from command line by adding ‘start ‘ in the beginning of the command.

7 comments… add one
  • Pavan

    Why executing ‘excel’ from cmd does not work though it works from Run? I get the error ”excel’ is not recognized as an internal or external command,operable program or batch file’.

  • Martin

    You must use excel.exe and not only excel

    • admin

      Even excel.exe generates the same error. Only Start excel works from cmd.

  • johnny

    admin is correct only start excel from cmd works

  • Ashraz

    to find installed Excel version?

  • Ravindra

    How to save as excel file in html format with same name in same location
    and also how to handle if override dialog comes?

    Provide me command which can run in command prompt

  • DJ

    How to open already created Excel file and Save it through Command window

Leave a Comment