Skip to main content

IXlSheetViewOptions.ShowRowColumnHeaders Property

Gets or sets whether row and column headers are visible on the worksheet.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

bool ShowRowColumnHeaders { get; set; }

Property Value

Type Description
Boolean

true, to display row and column headers; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShowRowColumnHeaders
IXlSheet
.ViewOptions .ShowRowColumnHeaders

Remarks

The image below shows the appearance of the worksheet when row and column headers are shown, and when row and column headers are hidden (the workbook is opened in Microsoft® Excel®).

XLExport_ViewOptions_ShowHeaders

Example

Each worksheet (IXlSheet) consists of cells (IXlCell) that are arranged in rows (IXlRow) and columns (IXlColumn). Each row and column has its own unique name (numbers “1”, “2”, “3”, etc. are used for rows and letters A”, “B”, “C”, etc. are used for columns). These unique names for rows and columns are displayed as headers at the left and at the top of a worksheet, respectively. To specify the visibility of row and column headers on a worksheet, use the IXlSheetViewOptions.ShowRowColumnHeaders property of the IXlSheetViewOptions object that controls worksheet display settings. It can be accessed using the IXlSheet.ViewOptions property.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/excel-export-api-examples

// Create a worksheet. 
using (IXlSheet sheet = document.CreateSheet())
{
    // Hide row and column headers in the worksheet.
    sheet.ViewOptions.ShowRowColumnHeaders = false;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowRowColumnHeaders property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also