Page tree
Skip to end of metadata
Go to start of metadata

Description

The Worksheets class represents the set of worksheets in an Excel workbook. This object is used to manage (add, copy, remove, etc.) the worksheets in the workbook To return a Worksheets object, use Workbook.Worksheets.

C#
vb.net

Properties

Name

Description

Count

Returns the number of worksheets in the workbook.

Indexers

Name

Description

Item(Int32)

Returns the worksheet at the specified position. This property is an indexer for the Worksheets class.

Item(String)

Returns the worksheet with the specified name. This property is an indexer for the Worksheets class.

Methods

Name

Description

CopySheet(Worksheet, Int32, String)

Copies a worksheet in the workbook to another position in the same workbook.

CreateChartsheet(ChartType, String)

Creates a new chartsheet after the last existing worksheet in this workbook.

CreateChartsheet(ChartType, String, Int32)

Creates a new Chartsheet at a specified position in the workbook.

CreateWorksheet(String)

Creates a new worksheet after the last existing worksheet in this workbook.

CreateWorksheet(String, Int32)

Creates a new worksheet at a specified position in the workbook.

Delete(Int32)

Deletes a worksheet from the workbook.

Delete(String)

Deletes a worksheet from the workbook.

GetEnumerator()

Returns an IEnumerator for the individual Worksheets in a Worksheets object

InsertSheet(String, Int32)

Inserts a new worksheet into the workbook at a specified position.

MoveSheet(Worksheet, Int32)

Moves a worksheet to a different position in the workbook.

Select(Object())

Set the sheets that will be selected when the workbook is opened in Excel.
  • No labels