Compartilhar via


WorkbookBase.WebOptions Property

Definition

Gets the 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.

public:
 property Microsoft::Office::Interop::Excel::WebOptions ^ WebOptions { Microsoft::Office::Interop::Excel::WebOptions ^ get(); };
public Microsoft.Office.Interop.Excel.WebOptions WebOptions { get; }
member this.WebOptions : Microsoft.Office.Interop.Excel.WebOptions
Public ReadOnly Property WebOptions As WebOptions

Property Value

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

Examples

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.

This example is for a document-level customization.

private void SetWebOptions()
{
    this.WebOptions.AllowPNG = true;
    this.WebOptions.DownloadComponents = true;
    this.WebOptions.UseLongFileNames = true;
}
Private Sub SetWebOptions()
    Me.WebOptions.AllowPNG = True
    Me.WebOptions.DownloadComponents = True
    Me.WebOptions.UseLongFileNames = True
End Sub

Applies to