Partager via


Sheets Interface

A collection of all the sheets in the specified or active workbook.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
<GuidAttribute("000208D7-0000-0000-C000-000000000046")> _
Public Interface Sheets _
    Inherits IEnumerable
'Usage
Dim instance As Sheets
[GuidAttribute("000208D7-0000-0000-C000-000000000046")]
public interface Sheets : IEnumerable

Remarks

The Sheets collection can contain Chart or Worksheet objects. The Sheets collection is useful when you want to return sheets of any type. If you need to work with sheets of only one type, see the object topic for that sheet type.

Use the Sheets property to return the Sheets collection.

Use the Add method to create a new sheet and add it to the collection.

Use Sheets(index), where index is the sheet name or index number, to return a single Chart or Worksheet object.

Use Sheets(array) to specify more than one sheet.

See Also

Reference

Sheets Members

Microsoft.Office.Interop.Excel Namespace