aspose.cells

Class StyleCollection

Encapsulates a collection of Style objects.
NOTE: This class is now obsolete. Instead, please use Workbook.CreateStyle() to create and manipulate style for workbook instead of StyleCollection.Add() and use Workbook.GetNamedStyle(string) to get named style instead of StyleCollection[string]. This property will be removed 12 months later since February 2015. Aspose apologizes for any inconvenience you may have experienced.

Property Getters/Setters Summary
functiongetCount()
Gets the count of elements in the collection.
functionget(index)
Gets the Style element at the specified index.
functionget(name)
Gets the Style element with the specified name.
 
Method Summary
functionadd()
Adds a Style to the collection.
functioncreateBuiltinStyle(type)
Creates built-in style by given type.
functiongetThemeStyle(themeColorType, tint)
Gets the theme style.
 

    • Property Getters/Setters Detail

      • getCount : Number 

        function getCount()
        
        Gets the count of elements in the collection.
      • get : Style 

        function get(index)
        
        Gets the Style element at the specified index.
        Parameters:
        index - The zero based index of the element.
        Returns:
        The element at the specified index.
      • get : Style 

        function get(name)
        
        Gets the Style element with the specified name.
        Parameters:
        name - Style name
        Returns:
        The element with the specified name.
    • Method Detail

      • getThemeStyle

        function getThemeStyle(themeColorType, tint)
        Gets the theme style.
        Parameters:
        themeColorType: Number - A ThemeColorType value. The theme color type.
        tint: Number - The tint value.
        Returns:
      • createBuiltinStyle

        function createBuiltinStyle(type)
        Creates built-in style by given type.
        Parameters:
        type: Number - A BuiltinStyleType value.
        Returns:
        style object
      • add

        function add()
        Adds a Style to the collection. If using this method to create a new style and the style name is set, a new style will be added to the style dialog of MS Excel. To avoid this, you can leave the style name blank. NOTE: This property is now obsolete. Instead, please use Workbook.CreateStyle() to create and manipulate style for workbook instead. This property will be removed 12 months later since December 2014. Aspose apologizes for any inconvenience you may have experienced.
        Returns:
        Style object index.