Export (0) Print
Expand All
Expand Minimize

Workbook.Windows Property

Gets a Microsoft.Office.Interop.Excel.Windows collection that represents all the windows in the workbook.

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

public virtual Windows Windows { get; }

Property Value

A Microsoft.Office.Interop.Excel.Windows collection that represents all the windows in the workbook.

This property returns a collection of both visible and hidden windows.

The following code example uses the Windows property to display formulas, gridlines, and the outline of the current workbook.

private void SetWindowOptions()
{
    this.Windows[1].DisplayFormulas = true;
    this.Windows[1].DisplayGridlines = true;
    this.Windows[1].DisplayOutline = true;
}

Show:
© 2014 Microsoft