asposecells.api

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
methodgetCount()
Gets the count of elements in the collection.
methodget(index)
Gets the Style element at the specified index.
methodget(name)
Gets the Style element with the specified name.
 
Method Summary
methodadd()
Adds a Style to the collection.
methodcreateBuiltinStyle(type)
Creates built-in style by given type.
methodgetThemeStyle(themeColorType, tint)
Gets the theme style.
 

    • Property Getters/Setters Detail

      • getCount : int 

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

        Style 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 

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

      • getThemeStyle

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

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

        int 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.