O'Reilly logo

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Publish to the Web

Publishing items to the Web is an alternative to printing and distributing workbooks or worksheets manually. Unlike printed copies, published items may be interactive and can update automatically when you save changes to a workbook. To use these features you must have Excel 2000 or later and have write access to a web site or a network share. SharePoint document libraries support Excel publishing features, so I’ll use the document library http://www.excelworkshop.com/Ch11Sample/ as the publishing location throughout this chapter.

To publish an item from Excel :

  1. Select the item to publish and choose File → Save, then select “Web Page (*.htm; *.html)” from the “Save as Type” listbox. Excel displays the publish options on the Save As dialog box (Figure 11-3).

  2. Choose a public location such as a network share, FTP address, or URL to save the web page to and click Publish. Excel displays the Publish as Web Page dialog box (Figure 11-4).

  3. Choose additional publishing options and click Publish to save the item as a web page.

If you select Add Interactivity With in Figure 11-4, Excel adds the following ActiveX control to the web page:

<object id="ch11_publish_Spreadsheet" classid="CLSID:0002E559-0000-0000-C000-000000000046"> <param name=DisplayTitleBar value=false> <param name=Autofit value=true> <param name=DataType value=XMLData> <param name=XMLData value="..."> <p style='margin-top:100;font-family:Arial;font-size:8.0pt'>To use this Web page interactively, you must ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required