Styles Styles Styles Interface


A collection of all the Style objects in the specified or active workbook.

public interface class Styles : System::Collections::IEnumerable
public interface Styles : System.Collections.IEnumerable
Public Interface Styles
Implements IEnumerable


Each Style object represents a style description for a range. The Style object contains all style attributes (font, number format, alignment, and so on) as properties. There are several built-in styles — including Normal, Currency, and Percent — which are listed in the Style name box in the Style dialog box (Format menu).

Use the Styles property to return the Styles collection.

Use the Add(String, Object) method to create a new style and add it to the collection.

Use Styles(index), where index is the style index number or name, to return a single Style object from the workbook Styles collection.


_Default[Object] _Default[Object] _Default[Object]

Reserved for internal use.

Application Application Application

Returns an Application object that represents the Microsoft Excel application.

Count Count Count

Returns the number of objects in the collection.

Creator Creator Creator

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

Item[Object] Item[Object] Item[Object]

Returns a single object from a collection.

Parent Parent Parent

Returns the parent object for the specified object.


Add(String, Object) Add(String, Object) Add(String, Object)

Creates a new style and adds it to the list of styles that are available for the current workbook.

GetEnumerator() GetEnumerator() GetEnumerator()
Merge(Object) Merge(Object) Merge(Object)

Merges the styles from another workbook into the Styles collection.

Applies to