|
|
|
This page presents how to work with Microsoft Excel 2007 features and its redesigned interface. You may also visit our Excel Question page.
|
Command-line switches for Excel
This article shows you how to customize the way that Microsoft Office Excel 2007 starts by adding switches and parameters to the startup command. For example, you can prevent the startup screen from appearing when you start Office Excel 2007, or you can have Excel open a specific file when it starts.
Command line switches are also called command-line options, and sometimes you can use a parameter without a switch.
If you want to use a switch and any associated parameters just one time, you can type the command in the Run dialog box (Start menu) in Microsoft Windows. If you want to use the same switch and associated parameters many times, you can create a desktop shortcut that always starts the program by using the same switch and parameters. This article discusses how to do both, and contains a table that lists all of the switches and parameters that are available in Office Excel 2007.
In this article

Introducing commands, switches, and parameters
Use a switch once by adding it to the Run command
Make a switch available for reuse by creating a shortcut
Available switches and parameters

Introducing commands, switches, and parameters
Each time that you start Excel 2007 by clicking the Excel program icon or the program name on the Start menu, you are actually running the Excel.exe command, although you do not usually type the command or even see it.
You can change certain aspects of how the program starts by adding subcommands called switches to the Excel.exe command. A switch appears as a space after the main command, followed by a slash mark (/) and the name of the switch. The switch is sometimes followed by another space and then one or more specific instructions called parameters, which give the program further information about how to execute the Excel.exe command. For example, the following command instructs Excel to start and then open the specified file as read-only:
excel.exe /r "c:\My Folder\book1.xlsx"
In this example, the switch is /r, and the parameter is "c:\My Folder\book1.xlsx".
Top of Page
Use a switch once by adding it to the Run command
- In Microsoft Windows, click the Start button, and then click Run.
Note If you are running Windows Vista and you click the Start button
and do not see the Run command, point to All Programs, click Accessories, and then click Run.
- In the Run dialog box, type excel.exe, or click Browse to locate it.
- Type a space, and then type the switch and any parameters. For example, to start Excel without displaying the startup screen and without opening a blank workbook, you would type:
excel.exe /e
The next time that you start Excel, the program will start according to its defaults (without making use of the switch that you just provided). To make your customized startup available for repeated uses, see the following section.
Notes
- Switches and parameters are not case-sensitive. For example, /R is the same as /r.
- Remember to include one blank space before the switch and one before each parameter.
Top of Page
Make a switch available for reuse by creating a shortcut
First, verify the location of the Excel.exe file on your computer. If you accepted the default folder locations when you installed Excel, the Excel.exe file is probably located at:
C:\Program Files\Microsoft Office\Office12\Excel.exe
If you do not find the Excel.exe file at that location, search for the file and make a note of the full path.
- Right-click the Windows desktop, point to New, and then click Shortcut on the shortcut menu.
- In the Create Shortcut Wizard, in the Type the location of the item box, type a quotation mark ("), enter the full path for the Excel.exe file (including the file name), and then type a quotation mark. (Alternatively, click Browse to locate and select the file. In this case, the quotation marks are added automatically.)
- Following the closing quotation mark, type a space, and then type the switch and any parameters. If the parameter is a path to a location on your computer, and the path contains a space, it also must be enclosed in quotation marks. For example:
"c:\program files\microsoft office\office12\excel.exe" /r "c:\My Folder\book1.xlsx"
- Click Next.
- In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.
The wizard creates the shortcut and places it on the desktop.
- Whenever you want to start Excel in this particular customized way, double-click the shortcut.
Tip To add the desktop shortcut to the Windows Start menu, right-click the shortcut, and then click Pin to Start menu on the shortcut menu.
You can create a variety of shortcuts, each of which applies different switches and parameters to the program at startup.
Notes
- Switches and parameters are not case-sensitive. For example, /R functions the same as /r.
- Remember to include one blank space before the switch and one before each parameter.
Top of Page
Available switches and parameters
The following table lists all of the switches and parameters that are available in Office Excel 2007.
|
Switch and parameter
|
Description
|
|
workbook path | file name
This parameter does not require a switch.
|
Starts Excel and opens the specified file.
Example
excel.exe "c:\My Folder\book1.xlsx"
or
excel.exe http://MySite/Book1.xlsx
|
|
/r workbook path | file name
|
Opens a specific workbook as read-only.
Example
excel.exe /r "c:\My Folder\book1.xlsx"
or
excel.exe /r http://MySite/Book1.xlsx
|
|
/t workbook path | file name
|
Starts Excel and opens the specified file as a template.
Example
excel.exe /t "c:\My Folder\book_name.xlsx"
.
or
excel.exe /t http://MySite/book_name.xlsx
|
|
/n workbook path | file name
|
Like /t, starts Excel and opens the specified file as a template.
Example
excel.exe /n "c:\My Folder\book_name.xlsx"
.
or
excel.exe /n http://MySite/book_name.xlsx
|
|
/e or /embed
|
Prevents the Excel startup screen from appearing and a new blank workbook from opening.
Example
excel.exe /e
|
|
/p workbook path
|
Specifies a folder as the active working folder (for example, the folder that is pointed to in the Save As dialog box).
Example
excel.exe /p "c:\My Folder"
|
|
/s or /safemode
|
Forces Excel to bypass all files that are stored in startup directories, such as the default XLStart folder located in the directory where Excel or the 2007 Microsoft Office system is installed.
Example
excel.exe /s
|
|
/m
|
Creates a new workbook that contains a single XLM macro sheet.
Example
excel.exe /m
|
|
/a progID
|
Starts Excel and loads the Automation Addin that is specified by the progID of the add-in.
Example
excel.exe /a MyProgId.MyProgID2.1
|
Top of Page
See Also
Excel > Activating Excel
Install or remove individual Office programs and components

Tags download; install; Excel; upgrade

What are tags?
When you first try to use a feature that is not yet installed, 2007 Microsoft Office system usually installs the feature automatically.
If the feature that you want is not installed automatically, do the following:
- Exit all programs.
- In Microsoft Windows, click the Start button, and then click Control Panel.
- Do one of the following:
- Windows Vista Click Programs, and then click Installed Programs. Click the name of the Microsoft Office edition or program you want to change, and then click Change.
Note In Classic view, double-click Programs, and then click Installed Programs. Click the name of the Microsoft Office edition or program you want to change, and then click Change.
- Microsoft Windows XP Click Add or Remove Programs, and then click Change or Remove Programs. Click the name of the Microsoft Office edition or program you want to change, and then click Change.
Note In Classic view, double-click Add or Remove Programs, click the name of the Microsoft Office edition or program you want to change, and then click Change.
- In the 2007 Microsoft Office system Setup dialog box, click Add or Remove Features, and then click Next.
- Click the custom installation options that you want:
- Click a plus sign (+) to expand a folder and see more features.
- The symbol next to each feature indicates how that feature will be installed by default. You can change how the feature will be installed by clicking its symbol, and then selecting another symbol from the list that appears. The symbols and their meanings are as follows:
Run from My Computer The feature will be installed and stored on your hard disk when you complete Setup. Subfeatures won't be installed and stored on your hard disk.
Run all from My Computer The feature and all of its subfeatures will be installed and stored on your hard disk when you complete Setup.
Installed on First Use The feature will be installed on your hard disk when you use the feature for the first time. At that time, you may need access to the CD or network server that you originally installed from. This option may not be available for all features.
Not Available The feature won't be installed because it is not available.
- If a feature has subfeatures, a symbol with a white background indicates that the feature and all of its subfeatures have the same installation method. A symbol with a gray background indicates that the feature and its subfeatures have a combination of installation methods.
- You can also use the keyboard to browse through features and change feature options. Use the UP ARROW and DOWN ARROW keys to select features. Use the RIGHT ARROW key to expand a feature that contains one or more subfeatures. Use the LEFT ARROW key to collapse an expanded feature. When you have selected the feature that you want to change, press SPACEBAR to display the menu of setup choices. Use the UP ARROW and DOWN ARROW keys to select the setup option that you want, and then press ENTER.
- When you are done choosing the custom installation options that you want, do one of the following:
- Click Upgrade. This button appears if Setup detects an earlier version of the same Office program on your computer.
- Click Install Now. This button appears if Setup does not detect an earlier version of the same Office program on your computer.
.
Excel > Installing
Setup command-line switches for the 2007 Office system
In the 2007 Microsoft Office system, the Setup.exe command line is used for very few operations, and almost all of these are for IT administrators only. However, you might want to use the /config switch if your administrator has created a config.xml file and told you where to locate that file.
In this article

How to use a Setup command-line switch
Available switches and parameters
More information in the Office Resource Kit

How to use a Setup command-line switch
- Do one of the following:
- Microsoft Windows Vista
- Click the Windows Start button
, point to All Programs, click Accessories, and then click Run.
- Microsoft Windows XP or Microsoft Windows Server 2003
- Click the Windows Start button, and then click Run.
- In the Run dialog box, type Setup.exe followed by a space and a forward slash (/).
- Type the name of the switch.
- If necessary, add another space followed by one or more specific instructions called parameters, which give the program further information about how to execute the command.
The switch reference table in the next section contains several examples.
Top of Page
Available switches and parameters
In the 2007 Office release Setup recognizes the following command-line options.
|
Switch or parameter
|
Description
|
|
/admin
|
Runs the Office Customization Tool to create a Setup customization file (Setup customization file: File generated by the Office Customization Tool and applied during or after installation to customize the user's default configuration.) (MSP file).
Example
\\server\share\Office12\setup.exe /admin
|
|
/adminfile [path]
|
Applies the specified Setup customization file to the installation. You can specify a path to a particular customization file (MSP file) or to the folder where you store customization files.
The recommended location for customization files is the Updates folder at the root of the network installation point. In this case, you do not need to specify the file on the command line; Setup automatically finds the customization file that matches the product being installed and applies it during the installation.
If you store more than one customization file per product in the Updates folder, Setup applies all of them to the installation. If you want to create unique configurations for different groups of users, you must store the customization files in a separate folder and specify the customization file you want on the command line.
Example
\\server\share\Office12\setup.exe /adminfile \\server\share\MyUpdates\Engineering.msp
where Office12 is the root of the network installation point.
|
|
/config [path]
|
Specifies the Config.xml file that Setup uses during the installation. By default, the Config.xml file stored in the core product folder directs Setup to install that product. For example, the Config.xml file in the Pro.WW folder installs Microsoft Office Professional 2007. You can edit Config.xml to make additional customizations to the installation, including specifying one or more language versions to install.
Use /config on the Setup command line to point to the location of the default Config.xml file for a particular product or to point to a custom Config.xml file.
Example
\\server\share\Office12\setup.exe /config \\server\share\Office12\Pro.WW\Config.xml
where Office12 is the root of the network installation point.
Note You must use a fully qualified path. Setup does not recognize relative paths with /config.
|
|
/modify [ProductID]
|
Used with a modified Config.xml file to run Setup in maintenance mode and make changes to an existing Office installation, such as adding or removing features. Look up the value of [ProductID] in the Setup.xml file for the product you want to modify. The Setup.xml file is located in the core product folder on the network installation point. In Setup.xml, [ProductID] is equal to the value of the Id attribute of the Setup element. For example:
- <Setup Id="Pro" Type="Product" ProductCode="{30120000-0011-0000-0000-1000000FF1CE}">
Example
\\server\share\Office12\setup.exe /modify Pro /config \\server\share\Office12\AddOutlookConfig.xml
|
|
/repair [ProductID]
|
Runs Setup to repair the specified product. Look up the value of [ProductID] in the Setup.xml file for the product you want to modify.
Example
\\server\share\Office12\setup.exe /repair Pro
where Office12 is the root of the network installation point.
|
|
/uninstall [ProductID]
|
Removes the specified product from the user's computer. Look up the value of [ProductID] in the Setup.xml file for the product you want to modify.
Example
\\server\share\Office12\setup.exe /uninstall Pro
where Office12 is the root of the network installation point.
|
Top of Page
More information in the Office Resource Kit
The Microsoft Office Resource Kit is an online deployment guide for administrators where you can find more information about Setup command-line options and properties.
Excel > Installing
Read the Microsoft Software License Terms
The Microsoft Software License Terms defines the legal conditions under which you can use your software. In Setup, select the I accept the terms of this agreement check box to enable the Continue button.
To view the Microsoft Software License Terms for your product after it is installed, do one of the following in these 2007 Microsoft Office system programs:
Access, Excel, PowerPoint, or Word
- Click the Microsoft Office Button
, and then click Program Name Options, where Program Name is the name of the program you are in, for example, Word Options.
- Click Resources, and then click About.
- Click View the Microsoft Software License Terms.
Clip Organizer, InfoPath, OneNote, Outlook, Publisher, Project, SharePoint Designer, or Visio
- On the Help menu, click About Program Name, where Program Name is the name of the program you are in, for example, About Microsoft Office Outlook.
- Click View the Microsoft Software License Terms.
If you receive an error message or encounter a problem, visit The 2007 Microsoft Office suites Setup Resource Center for troubleshooting information and how to contact Microsoft Product Support.