Aspose::Cells::IStyle Class Referenceabstract

Represents display style of excel document, such as font, color, alignment, border, etc. More...

Inherits Object.

Public Member Functions

virtual intrusive_ptr< Aspose::Cells::IThemeColorGetBackgroundIThemeColor ()=0
 Get the background theme color. More...
 
virtual void SetBackgroundIThemeColor (intrusive_ptr< Aspose::Cells::IThemeColor > value)=0
 Sets the background theme color. More...
 
virtual intrusive_ptr< Aspose::Cells::IThemeColorGetForegroundIThemeColor ()=0
 Gets the foreground theme color. More...
 
virtual void SetForegroundIThemeColor (intrusive_ptr< Aspose::Cells::IThemeColor > value)=0
 Sets the foreground theme color. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetName ()=0
 Gets the name of the style. More...
 
virtual void SetName (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets the name of the style. More...
 
virtual Aspose::Cells::BackgroundType GetPattern ()=0
 Gets the cell background pattern type. More...
 
virtual void SetPattern (Aspose::Cells::BackgroundType value)=0
 Sets the cell background pattern type. More...
 
virtual void SetPatternColor (Aspose::Cells::BackgroundType pattern, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > color1, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > color2)=0
 Sets the background color. More...
 
virtual intrusive_ptr< Aspose::Cells::IBorderCollectionGetIBorders ()=0
 Gets the IBorderCollection of the style. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > GetBackgroundColor ()=0
 Gets a style's background color. More...
 
virtual void SetBackgroundColor (intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > value)=0
 Sets a style's background color. More...
 
virtual Aspose::Cells::Systems::Int32 GetBackgroundArgbColor ()=0
 Gets the background color with a 32-bit ARGB value. More...
 
virtual void SetBackgroundArgbColor (Aspose::Cells::Systems::Int32 value)=0
 Sets the background color with a 32-bit ARGB value. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > GetForegroundColor ()=0
 Gets a style's foreground color. More...
 
virtual void SetForegroundColor (intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > value)=0
 Sets a style's foreground color. More...
 
virtual Aspose::Cells::Systems::Int32 GetForegroundArgbColor ()=0
 Gets the foreground color with a 32-bit ARGB value. More...
 
virtual void SetForegroundArgbColor (Aspose::Cells::Systems::Int32 value)=0
 Sets the foreground color with a 32-bit ARGB value. More...
 
virtual void Copy (intrusive_ptr< Aspose::Cells::IStyle > style)=0
 Copies data from another style object More...
 
virtual bool HasBorders ()=0
 Checks whether there are borders have been set for the style. More...
 
virtual intrusive_ptr< Aspose::Cells::IStyleGetParentIStyle ()=0
 Gets the parent style of this style. More...
 
virtual void Update ()=0
 Apply the named style to the styles of the cells which use this named style. It works like clicking the "ok" button after you finished modifying the style. Only applies for named style. More...
 
virtual bool IsModified (Aspose::Cells::StyleModifyFlag modifyFlag)=0
 Checks whether the specified properties of the style have been modified. Used for style of ConditionalFormattings to check whether the specified properties of this style should be used when applying the ConditionalFormattings on a cell. More...
 
virtual bool Equals (intrusive_ptr< Aspose::Cells::Systems::Object > obj)=0
 Determines whether two Style instances are equal. More...
 
virtual Aspose::Cells::Systems::Int32 GetHashCode ()=0
 Serves as a hash function for a Style object. More...
 
virtual Aspose::Cells::Systems::Int32 GetIndentLevel ()=0
 Represents the indent level for the cell or range. Can only be an integer from 0 to 250. More...
 
virtual void SetIndentLevel (Aspose::Cells::Systems::Int32 value)=0
 Represents the indent level for the cell or range. Can only be an integer from 0 to 250. More...
 
virtual intrusive_ptr< Aspose::Cells::IFontGetIFont ()=0
 Gets an IFont object. More...
 
virtual Aspose::Cells::Systems::Int32 GetRotationAngle ()=0
 Represents text rotation angle. More...
 
virtual void SetRotationAngle (Aspose::Cells::Systems::Int32 value)=0
 Represents text rotation angle. More...
 
virtual Aspose::Cells::TextAlignmentType GetHorizontalAlignment ()=0
 Gets the horizontal alignment type of the text in a cell. More...
 
virtual void SetHorizontalAlignment (Aspose::Cells::TextAlignmentType value)=0
 Sets the horizontal alignment type of the text in a cell. More...
 
virtual Aspose::Cells::TextAlignmentType GetVerticalAlignment ()=0
 Checks the vertical alignment type of the text in a cell. More...
 
virtual void SetVerticalAlignment (Aspose::Cells::TextAlignmentType value)=0
 Sets the vertical alignment type of the text in a cell. More...
 
virtual bool IsTextWrapped ()=0
 Gets or sets a value indicating whether the text within a cell is wrapped. More...
 
virtual void SetTextWrapped (bool value)=0
 Sets a value indicating whether the text within a cell is wrapped. More...
 
virtual Aspose::Cells::Systems::Int32 GetNumber ()=0
 Gets the display format of numbers and dates. The formatting patterns are different for different regions. More...
 
virtual void SetNumber (Aspose::Cells::Systems::Int32 value)=0
 Sets the display format of numbers and dates. The formatting patterns are different for different regions. More...
 
virtual bool SetBorder (Aspose::Cells::BorderType borderEdge, Aspose::Cells::CellBorderType borderStyle, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > borderColor)=0
 Sets the borders of the style. More...
 
virtual bool IsLocked ()=0
 Gets a value indicating whether a cell can be modified or not. More...
 
virtual void SetLocked (bool value)=0
 Sets a value indicating whether a cell can be modified or not. More...
 
virtual void SetCustom (intrusive_ptr< Aspose::Cells::Systems::String > custom, bool builtinPreference)=0
 Sets the custom number format string of a cell. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetCustom ()=0
 Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned. More...
 
virtual void SetCustom (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetCultureCustom ()=0
 Gets the culture custom number format. More...
 
virtual void SetCultureCustom (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets the culture custom number format. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetInvariantCustom ()=0
 Gets the culture-independent pattern string for number format. If no number format has been set for this object, null will be returned. If number format is builtin, the pattern string corresponding to the builtin number will be returned. More...
 
virtual bool IsFormulaHidden ()=0
 Represents if the formula will be hidden when the worksheet is protected. More...
 
virtual void SetFormulaHidden (bool value)=0
 Represents if the formula will be hidden when the worksheet is protected. More...
 
virtual bool GetShrinkToFit ()=0
 Represents if text automatically shrinks to fit in the available column width. More...
 
virtual void SetShrinkToFit (bool value)=0
 Represents if text automatically shrinks to fit in the available column width. More...
 
virtual Aspose::Cells::TextDirectionType GetTextDirection ()=0
 Represents text reading order. More...
 
virtual void SetTextDirection (Aspose::Cells::TextDirectionType value)=0
 Represents text reading order. More...
 
virtual bool IsJustifyDistributed ()=0
 Indicates if the cells justified or distributed alignment should be used on the last line of text.
More...
 
virtual void SetJustifyDistributed (bool value)=0
 Indicates if the cells justified or distributed alignment should be used on the last line of text.
More...
 
virtual bool GetQuotePrefix ()=0
 Indicates whether the cell's value starts with single quote mark. More...
 
virtual void SetQuotePrefix (bool value)=0
 Indicates whether the cell's value starts with single quote mark. More...
 
virtual bool IsGradient ()=0
 Indicates whether the cell shading is a gradient pattern. More...
 
virtual void SetGradient (bool value)=0
 Indicates whether the cell shading is a gradient pattern. More...
 
virtual void SetTwoColorGradient (intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > color1, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > color2, Aspose::Cells::Drawing::GradientStyleType gradientStyleType, Aspose::Cells::Systems::Int32 variant)=0
 Sets the specified fill to a two-color gradient. More...
 
virtual void GetTwoColorGradient (intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > &color1, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > &color2, Aspose::Cells::Drawing::GradientStyleType &gradientStyleType, Aspose::Cells::Systems::Int32 &variant)=0
 Get the two-color gradient setting. More...
 
virtual bool IsPercent ()=0
 Indicates whether the number format is a percent format. More...
 
virtual bool IsDateTime ()=0
 Indicates whether the number format is a date format. More...
 

Detailed Description

Represents display style of excel document, such as font, color, alignment, border, etc.

Member Function Documentation

◆ Copy()

virtual void Aspose::Cells::IStyle::Copy ( intrusive_ptr< Aspose::Cells::IStyle style)
pure virtual

Copies data from another style object

Parameters
styleSource Style object

This method does not copy the name of the style. If you want to copy the name, please call the following codes after copying style: destStyle->SetName(style->GetName())

◆ Equals()

virtual bool Aspose::Cells::IStyle::Equals ( intrusive_ptr< Aspose::Cells::Systems::Object >  obj)
pure virtual

Determines whether two Style instances are equal.

Parameters
objThe Style object to compare with the current Style object.
Returns
true if the specified Object is equal to the current Object; otherwise, false.

◆ GetBackgroundArgbColor()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetBackgroundArgbColor ( )
pure virtual

Gets the background color with a 32-bit ARGB value.

◆ GetBackgroundColor()

virtual intrusive_ptr<Aspose::Cells::Systems::Drawing::Color> Aspose::Cells::IStyle::GetBackgroundColor ( )
pure virtual

Gets a style's background color.

If you want to set a cell's color, please use GetForegroundColor method of IStyle. Only if the cell style pattern is other than none or solid, this property will take effect.

◆ GetBackgroundIThemeColor()

virtual intrusive_ptr<Aspose::Cells::IThemeColor> Aspose::Cells::IStyle::GetBackgroundIThemeColor ( )
pure virtual

Get the background theme color.

If the background color is not a theme color, NULL will be returned.

◆ GetCultureCustom()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IStyle::GetCultureCustom ( )
pure virtual

Gets the culture custom number format.

◆ GetCustom()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IStyle::GetCustom ( )
pure virtual

Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned.

The returned custom string is culture-independent.

◆ GetForegroundArgbColor()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetForegroundArgbColor ( )
pure virtual

Gets the foreground color with a 32-bit ARGB value.

◆ GetForegroundColor()

virtual intrusive_ptr<Aspose::Cells::Systems::Drawing::Color> Aspose::Cells::IStyle::GetForegroundColor ( )
pure virtual

Gets a style's foreground color.

It means no color setting if Color::Empty is returned.

◆ GetForegroundIThemeColor()

virtual intrusive_ptr<Aspose::Cells::IThemeColor> Aspose::Cells::IStyle::GetForegroundIThemeColor ( )
pure virtual

Gets the foreground theme color.

If the foreground color is not a theme color, NULL will be returned.

◆ GetHashCode()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetHashCode ( )
pure virtual

Serves as a hash function for a Style object.

Returns
A hash code for the current Object.

This method is only for internal use.

◆ GetHorizontalAlignment()

virtual Aspose::Cells::TextAlignmentType Aspose::Cells::IStyle::GetHorizontalAlignment ( )
pure virtual

Gets the horizontal alignment type of the text in a cell.

◆ GetIBorders()

virtual intrusive_ptr<Aspose::Cells::IBorderCollection> Aspose::Cells::IStyle::GetIBorders ( )
pure virtual

Gets the IBorderCollection of the style.

◆ GetIFont()

virtual intrusive_ptr<Aspose::Cells::IFont> Aspose::Cells::IStyle::GetIFont ( )
pure virtual

Gets an IFont object.

◆ GetIndentLevel()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetIndentLevel ( )
pure virtual

Represents the indent level for the cell or range. Can only be an integer from 0 to 250.

If text horizontal alignment type is set to value other than left or right, m_IndentLevel level will be reset to zero.

◆ GetInvariantCustom()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IStyle::GetInvariantCustom ( )
pure virtual

Gets the culture-independent pattern string for number format. If no number format has been set for this object, null will be returned. If number format is builtin, the pattern string corresponding to the builtin number will be returned.

◆ GetName()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IStyle::GetName ( )
pure virtual

Gets the name of the style.

◆ GetNumber()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetNumber ( )
pure virtual

Gets the display format of numbers and dates. The formatting patterns are different for different regions.

For example, the formatting patterns represented by numbers for en_US region:

<font color="gray">Value </font>

<font color="gray">Type </font>

<font color="gray">Format String </font>

0

General

General

1

Decimal

0

2

Decimal

0.00

3

Decimal

#,##0

4

Decimal

#,##0.00

5

Currency

$#,##0_);($#,##0)

6

Currency

$#,##0_);Red

7

Currency

$#,##0.00_);($#,##0.00)

8

Currency

$#,##0.00_);Red

9

Percentage

0%

10

Percentage

0.00%

11

Scientific

0.00E+00

12

Fraction

# ?/?

13

Fraction

# ??/??

14

Date

m/d/yyyy

15

Date

d-mmm-yy

16

Date

d-mmm

17

Date

mmm-yy

18

Time

h:mm AM/PM

19

Time

h:mm:ss AM/PM

20

Time

h:mm

21

Time

h:mm:ss

22

Time

m/d/yyyy h:mm

37

Accounting

#,##0_);(#,##0)

38

Accounting

#,##0_);Red

39

Accounting

#,##0.00_);(#,##0.00)

40

Accounting

#,##0.00_);Red

41

Accounting

_(* #,##0_);_(* (#,##0);_(* "-"_);_()

42

Currency

_($* #,##0_);_($* (#,##0);_($* "-"_);_()

43

Accounting

_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_()

44

Currency

_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_()

45

Time

mm:ss

46

Time

[h]:mm:ss

47

Time

mm:ss.0

48

Scientific

##0.0E+0

49

Text

</td>

◆ GetParentIStyle()

virtual intrusive_ptr<Aspose::Cells::IStyle> Aspose::Cells::IStyle::GetParentIStyle ( )
pure virtual

Gets the parent style of this style.

◆ GetPattern()

virtual Aspose::Cells::BackgroundType Aspose::Cells::IStyle::GetPattern ( )
pure virtual

Gets the cell background pattern type.

◆ GetQuotePrefix()

virtual bool Aspose::Cells::IStyle::GetQuotePrefix ( )
pure virtual

Indicates whether the cell's value starts with single quote mark.

◆ GetRotationAngle()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IStyle::GetRotationAngle ( )
pure virtual

Represents text rotation angle.

0: Not rotated.

255: Top to Bottom.

-90: Downward.

90: Upward.

You can set 255 or value ranged from -90 to 90.

◆ GetShrinkToFit()

virtual bool Aspose::Cells::IStyle::GetShrinkToFit ( )
pure virtual

Represents if text automatically shrinks to fit in the available column width.

◆ GetTextDirection()

virtual Aspose::Cells::TextDirectionType Aspose::Cells::IStyle::GetTextDirection ( )
pure virtual

Represents text reading order.

◆ GetTwoColorGradient()

virtual void Aspose::Cells::IStyle::GetTwoColorGradient ( intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > &  color1,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > &  color2,
Aspose::Cells::Drawing::GradientStyleType gradientStyleType,
Aspose::Cells::Systems::Int32 &  variant 
)
pure virtual

Get the two-color gradient setting.

Parameters
color1One gradient color.
Parameters
color2Two gradient color.
Parameters
gradientStyleTypeGradient shading style.
Parameters
variantThe gradient variant.

◆ GetVerticalAlignment()

virtual Aspose::Cells::TextAlignmentType Aspose::Cells::IStyle::GetVerticalAlignment ( )
pure virtual

Checks the vertical alignment type of the text in a cell.

◆ HasBorders()

virtual bool Aspose::Cells::IStyle::HasBorders ( )
pure virtual

Checks whether there are borders have been set for the style.

◆ IsDateTime()

virtual bool Aspose::Cells::IStyle::IsDateTime ( )
pure virtual

Indicates whether the number format is a date format.

◆ IsFormulaHidden()

virtual bool Aspose::Cells::IStyle::IsFormulaHidden ( )
pure virtual

Represents if the formula will be hidden when the worksheet is protected.

◆ IsGradient()

virtual bool Aspose::Cells::IStyle::IsGradient ( )
pure virtual

Indicates whether the cell shading is a gradient pattern.

◆ IsJustifyDistributed()

virtual bool Aspose::Cells::IStyle::IsJustifyDistributed ( )
pure virtual

Indicates if the cells justified or distributed alignment should be used on the last line of text.

This is typical for East Asian alignments but not typical in other contexts.

◆ IsLocked()

virtual bool Aspose::Cells::IStyle::IsLocked ( )
pure virtual

Gets a value indicating whether a cell can be modified or not.

Locking cells has no effect unless the worksheet is protected.

◆ IsModified()

virtual bool Aspose::Cells::IStyle::IsModified ( Aspose::Cells::StyleModifyFlag  modifyFlag)
pure virtual

Checks whether the specified properties of the style have been modified. Used for style of ConditionalFormattings to check whether the specified properties of this style should be used when applying the ConditionalFormattings on a cell.

Parameters
modifyFlagStyle modified flags
Returns
true if the specified properties have been modified

◆ IsPercent()

virtual bool Aspose::Cells::IStyle::IsPercent ( )
pure virtual

Indicates whether the number format is a percent format.

◆ IsTextWrapped()

virtual bool Aspose::Cells::IStyle::IsTextWrapped ( )
pure virtual

Gets or sets a value indicating whether the text within a cell is wrapped.

◆ SetBackgroundArgbColor()

virtual void Aspose::Cells::IStyle::SetBackgroundArgbColor ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the background color with a 32-bit ARGB value.

◆ SetBackgroundColor()

virtual void Aspose::Cells::IStyle::SetBackgroundColor ( intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  value)
pure virtual

Sets a style's background color.

If you want to set a cell's color, please use GetForegroundColor method of IStyle. Only if the cell style pattern is other than none or solid, this property will take effect.

◆ SetBackgroundIThemeColor()

virtual void Aspose::Cells::IStyle::SetBackgroundIThemeColor ( intrusive_ptr< Aspose::Cells::IThemeColor value)
pure virtual

Sets the background theme color.

If the background color is not a theme color, NULL will be returned.

◆ SetBorder()

virtual bool Aspose::Cells::IStyle::SetBorder ( Aspose::Cells::BorderType  borderEdge,
Aspose::Cells::CellBorderType  borderStyle,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  borderColor 
)
pure virtual

Sets the borders of the style.

Parameters
borderEdgeThe type fo the border.
borderStyleThe style of the border.
borderColorThe color of the border.
Returns
Returns whether changing the current borders.

◆ SetCultureCustom()

virtual void Aspose::Cells::IStyle::SetCultureCustom ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets the culture custom number format.

◆ SetCustom() [1/2]

virtual void Aspose::Cells::IStyle::SetCustom ( intrusive_ptr< Aspose::Cells::Systems::String >  custom,
bool  builtinPreference 
)
pure virtual

Sets the custom number format string of a cell.

Parameters
customcustom number format string, should be InvariantCulture pattern.
Parameters
builtinPreferenceIf given custom number format string matches one of the built-in number formats corresponding to current regional settings, whether set the number format as built-in instead of custom.

◆ SetCustom() [2/2]

virtual void Aspose::Cells::IStyle::SetCustom ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned.

The returned custom string is culture-independent.

◆ SetForegroundArgbColor()

virtual void Aspose::Cells::IStyle::SetForegroundArgbColor ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the foreground color with a 32-bit ARGB value.

◆ SetForegroundColor()

virtual void Aspose::Cells::IStyle::SetForegroundColor ( intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  value)
pure virtual

Sets a style's foreground color.

It means no color setting if Color::Empty is returned.

◆ SetForegroundIThemeColor()

virtual void Aspose::Cells::IStyle::SetForegroundIThemeColor ( intrusive_ptr< Aspose::Cells::IThemeColor value)
pure virtual

Sets the foreground theme color.

If the foreground color is not a theme color, NULL will be returned.

◆ SetFormulaHidden()

virtual void Aspose::Cells::IStyle::SetFormulaHidden ( bool  value)
pure virtual

Represents if the formula will be hidden when the worksheet is protected.

◆ SetGradient()

virtual void Aspose::Cells::IStyle::SetGradient ( bool  value)
pure virtual

Indicates whether the cell shading is a gradient pattern.

◆ SetHorizontalAlignment()

virtual void Aspose::Cells::IStyle::SetHorizontalAlignment ( Aspose::Cells::TextAlignmentType  value)
pure virtual

Sets the horizontal alignment type of the text in a cell.

◆ SetIndentLevel()

virtual void Aspose::Cells::IStyle::SetIndentLevel ( Aspose::Cells::Systems::Int32  value)
pure virtual

Represents the indent level for the cell or range. Can only be an integer from 0 to 250.

If text horizontal alignment type is set to value other than left or right, indent level will be reset to zero.

◆ SetJustifyDistributed()

virtual void Aspose::Cells::IStyle::SetJustifyDistributed ( bool  value)
pure virtual

Indicates if the cells justified or distributed alignment should be used on the last line of text.

This is typical for East Asian alignments but not typical in other contexts.

◆ SetLocked()

virtual void Aspose::Cells::IStyle::SetLocked ( bool  value)
pure virtual

Sets a value indicating whether a cell can be modified or not.

Locking cells has no effect unless the worksheet is protected.

◆ SetName()

virtual void Aspose::Cells::IStyle::SetName ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets the name of the style.

◆ SetNumber()

virtual void Aspose::Cells::IStyle::SetNumber ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the display format of numbers and dates. The formatting patterns are different for different regions.

For example, the formatting patterns represented by numbers for en_US region:

<font color="gray">Value </font>

<font color="gray">Type </font>

<font color="gray">Format String </font>

0

General

General

1

Decimal

0

2

Decimal

0.00

3

Decimal

#,##0

4

Decimal

#,##0.00

5

Currency

$#,##0_);($#,##0)

6

Currency

$#,##0_);Red

7

Currency

$#,##0.00_);($#,##0.00)

8

Currency

$#,##0.00_);Red

9

Percentage

0%

10

Percentage

0.00%

11

Scientific

0.00E+00

12

Fraction

# ?/?

13

Fraction

# ??/??

14

Date

m/d/yyyy

15

Date

d-mmm-yy

16

Date

d-mmm

17

Date

mmm-yy

18

Time

h:mm AM/PM

19

Time

h:mm:ss AM/PM

20

Time

h:mm

21

Time

h:mm:ss

22

Time

m/d/yyyy h:mm

37

Accounting

#,##0_);(#,##0)

38

Accounting

#,##0_);Red

39

Accounting

#,##0.00_);(#,##0.00)

40

Accounting

#,##0.00_);Red

41

Accounting

_(* #,##0_);_(* (#,##0);_(* "-"_);_()

42

Currency

_($* #,##0_);_($* (#,##0);_($* "-"_);_()

43

Accounting

_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_()

44

Currency

_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_()

45

Time

mm:ss

46

Time

[h]:mm:ss

47

Time

mm:ss.0

48

Scientific

##0.0E+0

49

Text

</td>

◆ SetPattern()

virtual void Aspose::Cells::IStyle::SetPattern ( Aspose::Cells::BackgroundType  value)
pure virtual

Sets the cell background pattern type.

◆ SetPatternColor()

virtual void Aspose::Cells::IStyle::SetPatternColor ( Aspose::Cells::BackgroundType  pattern,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  color1,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  color2 
)
pure virtual

Sets the background color.

Parameters
patternThe pattern.
color1The foreground color.
color2The background color. Only works when pattern is not BackgroundType.None and BackgroundType.Solid.

◆ SetQuotePrefix()

virtual void Aspose::Cells::IStyle::SetQuotePrefix ( bool  value)
pure virtual

Indicates whether the cell's value starts with single quote mark.

◆ SetRotationAngle()

virtual void Aspose::Cells::IStyle::SetRotationAngle ( Aspose::Cells::Systems::Int32  value)
pure virtual

Represents text rotation angle.

0: Not rotated.

255: Top to Bottom.

-90: Downward.

90: Upward.

You can set 255 or value ranged from -90 to 90.

◆ SetShrinkToFit()

virtual void Aspose::Cells::IStyle::SetShrinkToFit ( bool  value)
pure virtual

Represents if text automatically shrinks to fit in the available column width.

◆ SetTextDirection()

virtual void Aspose::Cells::IStyle::SetTextDirection ( Aspose::Cells::TextDirectionType  value)
pure virtual

Represents text reading order.

◆ SetTextWrapped()

virtual void Aspose::Cells::IStyle::SetTextWrapped ( bool  value)
pure virtual

Sets a value indicating whether the text within a cell is wrapped.

◆ SetTwoColorGradient()

virtual void Aspose::Cells::IStyle::SetTwoColorGradient ( intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  color1,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  color2,
Aspose::Cells::Drawing::GradientStyleType  gradientStyleType,
Aspose::Cells::Systems::Int32  variant 
)
pure virtual

Sets the specified fill to a two-color gradient.

Parameters
color1One gradient color.
Parameters
color2Two gradient color.
Parameters
gradientStyleTypeGradient shading style.
Parameters
variantThe gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyleType_FromCenter, the Variant argument can only be 1 or 2.

◆ SetVerticalAlignment()

virtual void Aspose::Cells::IStyle::SetVerticalAlignment ( Aspose::Cells::TextAlignmentType  value)
pure virtual

Sets the vertical alignment type of the text in a cell.

◆ Update()

virtual void Aspose::Cells::IStyle::Update ( )
pure virtual

Apply the named style to the styles of the cells which use this named style. It works like clicking the "ok" button after you finished modifying the style. Only applies for named style.