Edytuj

Udostępnij za pośrednictwem


Worksheets Interface

Definition

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

public interface class Worksheets : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000208B1-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Worksheets : System.Collections.IEnumerable
Public Interface Worksheets
Implements IEnumerable
Attributes
Implements

Remarks

Use the Worksheets property to return the Worksheets collection.

Use the Add(Object, Object, Object, Object) 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).

Properties

_Default[Object]

Reserved for internal use.

Application

Returns an Application object that represents the Microsoft Excel application. Read-only.

Count

Returns the number of objects in the collection. Read-only Integer.

Creator

Returns a 32-bit integer that indicates the application in which this object was created. If the object was created in Microsoft Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C. Read-only XlCreator.

HPageBreaks

Returns an HPageBreaks collection that represents the horizontal page breaks on the sheet. Read-only.

Item[Object]

Returns a single object from a collection.

Parent

Returns the parent object for the specified object. Read-only.

Visible

Determines whether the object is visible. Read/write Object.

VPageBreaks

Returns a VPageBreaks collection that represents the vertical page breaks on the sheet. Read-only.

Methods

_PrintOut(Object, Object, Object, Object, Object, Object, Object)

Reserved for internal use.

Add(Object, Object, Object, Object)
Add2(Object, Object, Object, Object)

This method is only implemented for the Charts collection object and will produce a run time error if used on the Sheets and Worksheets objects.

Copy(Object, Object)

Copies the sheet to another location in the workbook.

Delete()

Deletes the object.

FillAcrossSheets(Range, XlFillWith)

Copies a range to the same area on all other worksheets in a collection.

GetEnumerator()
Move(Object, Object)

Moves the sheet to another location in the workbook.

PrintOut(Object, Object, Object, Object, Object, Object, Object, Object)

Prints the object.

PrintOutEx(Object, Object, Object, Object, Object, Object, Object, Object, Object)

Reserved for internal use.

PrintPreview(Object)

Shows a preview of the object as it would look when printed.

Select(Object)

Selects the object.

Applies to