文章編號: 291288 - 檢視此文章適用的產品。
全部展開 | 全部摺疊

在此頁中

結論

Microsoft Excel 會接受許多您可用來控制如何在程式啟動時的選擇性參數。本文列出參數,並提供每個開關的說明。

其他相關資訊

選用參數,如 Excel 2013 稍有不同。若要瞭解更多相關資訊,請閱讀附件:Excel 的命令列參數

參數

下表會列出您可用來控制 Excel 的啟動參數。參數不會區分大小寫: /O等同於/o。在某些情況下,您可以使用一個以上的參數,一次。如果您在每次使用一個以上的參數,您必須區隔交換器分享空間-例如: /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
				

如何使用參數,當您啟動 Excel 時

如何加入切換控制至 [Microsoft Excel 的捷徑

若要加入切換控制至 [Microsoft Excel 的捷徑:
  1. 以滑鼠右鍵按一下 [啟動時,按一下 [開啟],然後按兩下 程式 資料夾。
  2. 以滑鼠右鍵按一下如Microsoft Excel的捷徑,按一下 [內容],然後按一下 [捷徑] 索引標籤。
  3. 在 [目標] 方塊中,鍵入您想要在所要執行命令之後的參數Excel.exe。 比方說,如果您想要啟動但不建立新的 Excel活頁簿,以及 Excel.exe 檔安裝在預設的位置,輸入在 [目標] 方塊中的下列:
    "C:\Program 必要 Office\Office\Excel.exe"/e
  4. 按一下[確定]

    附註如果沒有可用的選項,請在 [屬性] 對話方塊的 [捷徑] 索引標籤上,您的捷徑是視窗安裝程式的捷徑。如需有關如何修改這些快速鍵的詳細資訊,請按一下下面的文件編號,檢視 「 Microsoft 知識庫 」 中的文件:
    290379Office 捷徑] 索引標籤是無法使用

執行 Excel 一次使用參數,以使用 [指令的對齊方式

如果您要使用切換裝置中偶爾執行 Excel,您可以新增在命令列參數。若要執行這項操作:
  1. 按一下 [開始],然後按一下 [執行]。
  2. 在 [開啟] 方塊中輸入路徑 Excel.exe,然後再加上參數,您想要使用命令列結尾處。比方說,如果您想要略過在 [啟動] 資料夾中的所有檔案和 Excel.exe 檔案安裝在預設的位置,您可以輸入下列命令:
    "C:\Program 必要 Office\Office\Excel.exe"/s
  3. 按一下[確定]

屬性

文章編號: 291288 - 上次校閱: 2013年3月15日 - 版次: 1.0
這篇文章中的資訊適用於:
  • Microsoft Excel 2010
  • Microsoft Office Excel 2007
  • Microsoft Office Excel 2003
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 97 Standard Edition
關鍵字:?
kbinfo kbmt KB291288 KbMtzh
機器翻譯
重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。
按一下這裡查看此文章的英文版本:291288
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。

提供意見

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com