Select the product you need help with
Description of the startup switches for ExcelArticle ID: 291288 - View products that this article applies to. This article was previously published under Q291288 On This PageSummaryMicrosoft Excel accepts a number of optional switches that you can use to control how the program starts. This article lists the switches and provides a description of each switch. More information The optional switches for Excel 2013 differ slightly. To learn more about them, please read: Command-line switches for Excel
(http://office.microsoft.com/en-ca/excel-help/command-line-switches-for-excel-HA102919739.aspx?CTT=1)
SwitchesThe following table lists the switches that you can use to control how Excel starts. Switches are not case sensitive: /O is the same as /o. In some scenarios, you can use more than one switch at a time. If you use more than one switch at a time, you must separate the switches with spaces -- for example: /o /s
Switch Function
----------------------------------------------------------------------
/e, /embedded Forces Excel to start without displaying the
startup screen and creating a new workbook
(Book1.xls).
Example: /e or /embedded
/m Forces Excel to create a new workbook that
contains a single macro sheet.
Example: /m
/o Forces Excel to re-register itself. Specifically,
the following key is rewritten in the registry:
Excel 97: HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel
Excel 2000: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
Excel 2002: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel
Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel
NOTE: If this key contains values that are not valid,
they are not corrected by using this switch. This
switch only replaces missing values.
Example: /o
/p <folder> Forces Excel to use the path that you specify as the active
path instead of the default path.
Example: /p "C:\Windows"
/r <file name> Forces Excel to open the specified file in
read-only mode.
Example: /r "C:\My Documents\Test.xls"
/s, /safemode Forces Excel to bypass all files in the Application Data\Microsoft\Xlstart folder,
the default XLStart folder located in the directory where Excel or Office is installed,
and the alternate startup file location specified on the General tab of the Excel Options dialog box.
It also forces Excel
to bypass the toolbar file (Excel.xlb or
<username>.xlb). You see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.
Example: /s or /safemode
Switch Function
----------------------------------------------------------------------
/e, /embedded Forces Excel to start without displaying the
startup screen and creating a new workbook
(Book1.xls).
Example: /e or /embedded
/m Forces Excel to create a new workbook that
contains a single macro sheet.
Example: /m
/o Forces Excel to re-register itself. Specifically,
the following key is rewritten in the registry:
Excel 97: HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel
Excel 2000: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
Excel 2002: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel
Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel
NOTE: If this key contains values that are not valid,
they are not corrected by using this switch. This
switch only replaces missing values.
Example: /o
/p <folder> Forces Excel to use the path that you specify as the active
path instead of the default path.
Example: /p "C:\Windows"
/r <file name> Forces Excel to open the specified file in
read-only mode.
Example: /r "C:\My Documents\Test.xls"
/s, /safemode Forces Excel to bypass all files in the Application Data\Microsoft\Xlstart folder,
the default XLStart folder located in the directory where Excel or Office is installed,
and the alternate startup file location specified on the General tab of the Excel Options dialog box.
It also forces Excel
to bypass the toolbar file (Excel.xlb or
<username>.xlb). You see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.
Example: /s or /safemode
Switch Function
----------------------------------------------------------------------
/e, /embedded Forces Excel to start without displaying the
startup screen and creating a new workbook
(Book1.xls).
Example: /e or /embedded
/m Forces Excel to create a new workbook that
contains a single macro sheet.
Example: /m
/o Forces Excel to re-register itself. Specifically,
the following key is rewritten in the registry:
Excel 97: HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel
Excel 2000: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
Excel 2002: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel
Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel
NOTE: If this key contains values that are not valid,
they are not corrected by using this switch. This
switch only replaces missing values.
Example: /o
/p <folder> Forces Excel to use the path that you specify as the active
path instead of the default path.
Example: /p "C:\Windows"
/r <file name> Forces Excel to open the specified file in
read-only mode.
Example: /r "C:\My Documents\Test.xls"
/s, /safemode Forces Excel to bypass all files in the Application Data\Microsoft\Xlstart folder,
the default XLStart folder located in the directory where Excel or Office is installed,
and the alternate startup file location specified on the General tab of the Excel Options dialog box.
It also forces Excel
to bypass the toolbar file (Excel.xlb or
<username>.xlb). You see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.
Example: /s or /safemode
Switch Function
----------------------------------------------------------------------
/e, /embedded Forces Excel to start without displaying the
startup screen and creating a new workbook
(Book1.xls).
Example: /e or /embedded
/m Forces Excel to create a new workbook that
contains a single macro sheet.
Example: /m
/o Forces Excel to re-register itself. Specifically,
the following key is rewritten in the registry:
Excel 97: HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel
Excel 2000: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
Excel 2002: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel
Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel
NOTE: If this key contains values that are not valid,
they are not corrected by using this switch. This
switch only replaces missing values.
Example: /o
/p <folder> Forces Excel to use the path that you specify as the active
path instead of the default path.
Example: /p "C:\Windows"
/r <file name> Forces Excel to open the specified file in
read-only mode.
Example: /r "C:\My Documents\Test.xls"
/s, /safemode Forces Excel to bypass all files in the Application Data\Microsoft\Xlstart folder,
the default XLStart folder located in the directory where Excel or Office is installed,
and the alternate startup file location specified on the General tab of the Excel Options dialog box.
It also forces Excel
to bypass the toolbar file (Excel.xlb or
<username>.xlb). You see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.
Example: /s or /safemode
Switch Function
----------------------------------------------------------------------
/e, /embedded Forces Excel to start without displaying the
startup screen and creating a new workbook
(Book1.xls).
Example: /e or /embedded
/m Forces Excel to create a new workbook that
contains a single macro sheet.
Example: /m
/o Forces Excel to re-register itself. Specifically,
the following key is rewritten in the registry:
Excel 97: HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel
Excel 2000: HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel
Excel 2002: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel
Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel
NOTE: If this key contains values that are not vali Excel 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Exceld,
they are not corrected by using this switch. This
switch only replaces missing values.
Example: /o
/p <folder> Forces Excel to use the path that you specify as the active
path instead of the default path.
Example: /p "C:\Windows"
/r <file name> Forces Excel to open the specified file in
read-only mode.
Example: /r "C:\My Documents\Test.xls"
/s, /safemode Forces Excel to bypass all files in the Application Data\Microsoft\Xlstart folder,
the default XLStart folder located in the directory where Excel or Office is installed,
and the alternate startup file location specified on the General tab of the Excel Options dialog box.
It also forces Excel
to bypass the toolbar file (Excel.xlb or
<username>.xlb). You see "Safe Mode" in the
Excel title bar. Use this switch when you want to
start Excel in safe mode.
Example: /s or /safemode
/t Forces Excel to use the specified file as a
template for the default workbook.
/regserver Forces Excel to register itself and then quit. Use this
switch when you want Excel to rewrite all its
registry keys and reassociate itself with Excel files,
such as workbooks, charts, and others.(Applies only to versions before Excel 2010)
Example: /regserver
/unregserver Forces Excel to unregister itself and then quit.(Applies only to versions before Excel 2010)
Example: /unregserver
How to Use Switches When You Start ExcelHow to Add a Switch to the Microsoft Excel ShortcutTo add a switch to the Microsoft Excel shortcut:
How to Run Excel One Time with a Switch by Using the Command LineIf you want to run Excel with a switch occasionally, you can add the switch to the command line. To do this:
Properties | Article Translations
|


Back to the top








