Styles Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of all the Style objects in the specified or active workbook.
public interface class Styles : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("00020853-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Styles : System.Collections.IEnumerable
Public Interface Styles
Implements IEnumerable
- Attributes
- Implements
Remarks
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.
Properties
_Default[Object] |
Reserved for internal use. |
Application |
Returns an Application object that represents the Microsoft Excel application. |
Count |
Returns the number of objects in the collection. |
Creator |
Returns a 32-bit integer that indicates the application in which this object was created. |
Item[Object] |
Returns a single object from a collection. |
Parent |
Returns the parent object for the specified object. |
Methods
Add(String, Object) |
Creates a new style and adds it to the list of styles that are available for the current workbook. |
GetEnumerator() | |
Merge(Object) |
Merges the styles from another workbook into the Styles collection. |
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應