共用方式為


Style Members (Excel)

Represents a style description for a range.

Methods

Name

Description

Delete

Deletes the object.

Properties

Name

Description

AddIndent

Returns or sets a Boolean value that indicates if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.)

Application

When used without an object qualifier, this property returns an Application object that represents the Microsoft Excel application. When used with an object qualifier, this property returns an Application object that represents the creator of the specified object (you can use this property with an OLE Automation object to return the application of that object). Read-only.

Borders

Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).

BuiltIn

True if the style is a built-in style. Read-only Boolean.

Creator

Returns a 32-bit integer that indicates the application in which this object was created. Read-only Long.

Font

Returns a Font object that represents the font of the specified object.

FormulaHidden

Returns or sets a Boolean value that indicates if the formula will be hidden when the worksheet is protected.

HorizontalAlignment

Returns or sets a XlHAlign value that represents the horizontal alignment for the specified object.

IncludeAlignment

True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and Orientation properties. Read/write Boolean.

IncludeBorder

True if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. Read/write Boolean.

IncludeFont

True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. Read/write Boolean.

IncludeNumber

True if the style includes the NumberFormat property. Read/write Boolean

IncludePatterns

True if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. Read/write Boolean.

IncludeProtection

True if the style includes the FormulaHidden and Locked protection properties. Read/write Boolean.

IndentLevel

Returns or sets a Long value that represents the indent level for the style.

Interior

Returns an Interior object that represents the interior of the specified object.

Locked

Returns or sets a Boolean value that indicates if the object is locked.

MergeCells

True if the style contains merged cells. Read/write Variant.

Name

Returns a String value that represents the name of the object.

NameLocal

Returns or sets the name of the object, in the language of the user. Read-only String.

NumberFormat

Returns or sets a String value that represents the format code for the object.

NumberFormatLocal

Returns or sets a String value that represents the format code for the object as a string in the language of the user.

Orientation

Returns or sets a XlOrientation value that represents the text orientation.

Parent

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

ReadingOrder

Returns or sets the reading order for the specified object. Can be one of the following constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext. Read/write Long.

ShrinkToFit

Returns or sets a Boolean value that indicates if text automatically shrinks to fit in the available column width.

Value

Returns a String value that represents the name of the specified style.

VerticalAlignment

Returns or sets a XlVAlign value that represents the vertical alignment of the specified object.

WrapText

Returns or sets a Boolean value that indicates if Microsoft Excel wraps the text in the object.