편집

다음을 통해 공유


Sheets Interface

Definition

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

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

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

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)

Creates a new worksheet, chart, or macro sheet. The new worksheet becomes the active sheet.

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