Saving Worksheets as Web Pages
Converting your favorite spreadsheet into a Web page ready for publishing on a Web site is no more complicated than opening the worksheet in Excel and then choosing File → Save as Web Page.
To help you visualize how the spreadsheet-as-Web-page will appear when viewed in your default Web browser, you can use the Web Page Preview feature. To do this, choose File → Web Page Preview. This action launches your computer's default Web browser (usually this is Internet Explorer unless you've specifically installed and selected a different browser) and displays the spreadsheet more or less as it will appear in that browser when saved as an HTML file.
You can't save your spreadsheet as a Web page if the file is passwordprotected. If you've assigned a password to open the workbook or to modify the worksheet, you need to remove the password before you try saving the worksheet as a Web page.
If you decide that you want to save the spreadsheet as a Web page after previewing it in your Web browser, follow these steps to save the current worksheet or entire workbook as a Web page:
- Choose File → Save as Web Page to open a special version of the Save As dialog box.
- In the Save In drop-down list box, select the folder in which you want to save the HTML file.
- Enter the filename for the new HTML file in the File Name text box.
Note that Excel automatically appends the filename extension .htm (Hypertext Markup) to whatever filename you enter here if you're saving only the current worksheet. If you're saving an entire workbook that has data on more than one worksheet, Excel appends the filename extension .mht (Multiple Hypertext). When selecting a filename, keep in mind that some file servers (especially those running some flavor of UNIX) are sensitive to upper- and lowercase letters in the name.
- If you want to save only the current worksheet in the new HTML file, click the Selection: Sheet option button.
Note that the Selection option button changes name depending upon if anything is selected in the worksheet and whether or not the sheet has previously been saved as a Web page (in which case, the button becomes Republish: Sheet).
By default, Excel selects the Entire Workbook option button, meaning that all the worksheets in the workbook that contain data will be included in the new HTML file.
- If you want to add a page title to your HTML file, click the Change button, type the heading in the Page Title text box of the Set Page Title
dialog box, and click OK.
A page title appears centered at the top of the page right above your worksheet data. Don't confuse the page title with the Web page header that appears on the Web browser's title bar. (The only way to set the Web page header is to edit its HTML tag after the HTML file is created.)
- Click the Save button to save the file and close the Save As dialog box.
Excel saves the file and returns you to the Excel window (which now contains the HTML version of your workbook or worksheet in place of the original .xls file). You can then open the new HTML file in your Web browser by launching the browser, choosing File → Open on its menu bar, and navigating to the file you just saved.