Skip to main content
A newer version of this page is available. .

How to: Show and Hide Row and Column Headings

  • 2 minutes to read

Important

The Universal Subscription or an additional Document Server Subscription is required to use this example in production code. Please refer to the DevExpress Subscription page for pricing information.

Each worksheet (Worksheet) consists of cells (Worksheet.Cells) that are arranged in rows (Worksheet.Rows) and columns (Worksheet.Columns). 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 headings at the left and at the top of a worksheet, respectively. To control the visibility of row and column headings on a worksheet, use the WorksheetView.ShowHeadings property of the worksheet view object that is accessed via the Worksheet.ActiveView property.

Note

To specify whether row and column headings should be printed, use the WorksheetPrintOptions.PrintHeadings property of the object accessed via Worksheet.PrintOptions. Refer to the How to: Specify Print Settings document for details on how to specify print options for a worksheet.

// Hide row and column headings in the first worksheet.
workbook.Worksheets[0].ActiveView.ShowHeadings = false;

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

Spreadsheet_Worksheet_ActiveView_ShowHeadings