Skip to main content

SortHeader

Specifies whether the first row of the sort range contains the header information.

Type​

Enumeration

Values​

  • "xlNo"
  • "xlYes"

Example​

Specify that the first row contains header information.

// How do I specify a sort header for a range?

// Sort a range of cells indicating sorting header.

worksheet.GetRange("A1:C5").SetSort("A1:A5", "xlAscending", "B1:B5", "xlDescending", "C1:C5", "xlAscending", "xlYes", "xlSortColumns");