Export (0) Print
Expand All
Expand Minimize

Workbook.WebOptions Property

Gets the Microsoft.Office.Interop.Excel.WebOptions collection, which contains workbook-level attributes used by Microsoft Office Excel when you save a document as a Web page or open a Web page.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public virtual WebOptions WebOptions { get; }

Property Value

The Microsoft.Office.Interop.Excel.WebOptions collection, which contains workbook-level attributes used by Excel when you save a document as a Web page or open a Web page.

The following code example uses the WebOptions property to enable Portable Network Graphics (PNG) as an output format, download the Office Web components with the specified Web page if they are not already installed, and to allow long file names when the document is saved as a Web page.

private void SetWebOptions()
{
    this.WebOptions.AllowPNG = true;
    this.WebOptions.DownloadComponents = true;
    this.WebOptions.UseLongFileNames = true;
}

Show:
© 2014 Microsoft