Worksheets Interface

A collection of all the Worksheet objects in the specified or active workbook. Each Worksheet object represents a worksheet.

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

Syntax

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

Remarks

Use the Worksheets property to return the Worksheets collection.

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

Use Worksheets(index), where index is the worksheet index number or name, to return a single Worksheet object.

The Worksheet object is also a member of the Sheets collection. The Sheets collection contains all the sheets in the workbook (both chart sheets and worksheets).

See Also

Reference

Worksheets Members

Microsoft.Office.Interop.Excel Namespace