wxAutoExcel  2.0.0
wxAutoExcel::wxExcelStyle Class Reference

Represents Microsoft Excel Style object. More...

Inheritance diagram for wxAutoExcel::wxExcelStyle:
wxAutoExcel::wxExcelObject

Public Member Functions

bool Delete ()
 Deletes the object. More...
 
bool GetAddIndent ()
 If true then text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.) More...
 
void SetAddIndent (bool addIndent)
 If true then text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.) More...
 
wxExcelBorders GetBorders ()
 Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format). More...
 
bool GetBuiltIn ()
 Returns true if the style is one of the built-in ones. More...
 
wxExcelFont GetFont ()
 Returns a Font Represents the style font. More...
 
bool GetFormulaHidden ()
 If true the formula will be hidden when the worksheet is protected. More...
 
void SetFormulaHidden (bool formulaHidden)
 If true the formula will be hidden when the worksheet is protected. More...
 
XlHAlign GetHorizontalAlignment ()
 Returns a XlHAlign value that represents the horizontal alignment. More...
 
void SetHorizontalAlignment (XlHAlign horizontalAlignment)
 Sets a XlHAlign value that represents the horizontal alignment. More...
 
bool GetIncludeAlignment ()
 True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and Orientation properties. More...
 
void SetIncludeAlignment (bool includeAlignment)
 True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and Orientation properties. More...
 
bool GetIncludeBorder ()
 True if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. More...
 
void SetIncludeBorder (bool includeBorder)
 True if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. More...
 
bool GetIncludeFont ()
 True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. More...
 
void SetIncludeFont (bool includeFont)
 True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. More...
 
bool GetIncludeNumber ()
 True if the style includes the NumberFormat property. More...
 
void SetIncludeNumber (bool includeNumber)
 True if the style includes the NumberFormat property. More...
 
bool GetIncludePatterns ()
 True if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. More...
 
void SetIncludePatterns (bool includePatterns)
 True if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. More...
 
bool GetIncludeProtection ()
 True if the style includes the FormulaHidden and Locked protection properties. More...
 
void SetIncludeProtection (bool includeProtection)
 True if the style includes the FormulaHidden and Locked protection properties. More...
 
long GetIndentLevel ()
 Returns a the indent level for the style. More...
 
void SetIndentLevel (long indentLevel)
 Sets the indent level for the style. More...
 
wxExcelInterior GetInterior ()
 Returns an Interior Represents the style interior. More...
 
bool GetLocked ()
 True if the style is locked. More...
 
void SetLocked (bool locked)
 True if the style is locked. More...
 
bool GetMergeCells ()
 True if the style contains merged cells. More...
 
wxString GetName ()
 Returns the name of the object. More...
 
wxString GetNameLocal ()
 Returns the name of the object, in the language of the user. More...
 
wxString GetNumberFormat ()
 Returns a value that represents the format code for the object. More...
 
void SetNumberFormat (const wxString &numberFormat)
 Sets a value that represents the format code for the object. More...
 
wxString GetNumberFormatLocal ()
 Returns a value that represents the format code for the object as a string in the language of the user. More...
 
void SetNumberFormatLocal (const wxString &numberFormatLocal)
 Sets a value that represents the format code for the object as a string in the language of the user. More...
 
XlOrientation GetOrientation ()
 Returns the text orientation. More...
 
void SetOrientation (XlOrientation orientation)
 Sets athe text orientation. More...
 
long GetReadingOrder ()
 Returns the style reading order. More...
 
void SetReadingOrder (long readingOrder)
 Sets the style reading order. More...
 
bool GetShrinkToFit ()
 True if text automatically shrinks to fit in the available column width. More...
 
void SetShrinkToFit (bool shrinkToFit)
 True if text automatically shrinks to fit in the available column width. More...
 
XlVAlign GetVerticalAlignment ()
 Returns the style vertical alignment. More...
 
void SetVerticalAlignment (XlVAlign verticalAlignment)
 Sets the style vertical alignment. More...
 
bool GetWrapText ()
 True if Microsoft Excel wraps the text. More...
 
void SetWrapText (bool wrapText)
 True if Microsoft Excel wraps the text. More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "Style". More...
 
- Public Member Functions inherited from wxAutoExcel::wxExcelObject
bool IsOk_ () const
 Returns true if the object has a valid dispatch. More...
 
wxString GetAutomationObjectName_ (bool stripUnderscores=false) const
 Returns object name as provided by IDispatch->GetTypeInfo()->GetDocumentation(MEMBERID_NIL, &name, NULL, NULL, NULL). More...
 
wxSharedPtr< wxAutomationObject > GetAutomationObject_ ()
 Returns the underlying wxAutomationObject. More...
 
 operator bool () const
 Returns true if the object has a valid dispatch and its last automation call (if any), i.e. More...
 
WXLCID GetAutomationLCID_ () const
 Returns the locale identifier used in automation calls. More...
 
bool SetAutomationLCID_ (WXLCID lcid)
 Sets the locale identifier to be used in automation calls. More...
 
bool GetPropertyAndMethodNames_ (wxArrayString &propertyNames, wxArrayString &methodNames, bool includeHidden=false)
 Returns lists of property and method names the automation interface exposes. More...
 
bool GetUnimplementedObject_ (const wxString &name, wxAutomationObject &object)
 Helper function for receiving an automation object not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Additional Inherited Members

- Public Types inherited from wxAutoExcel::wxExcelObject
enum  ErrorFlags {
  Err_DoNothing = 0 , Err_LogOnInvalidDispatch = 1 , Err_AssertOnInvalidDispatch = 1 << 1 , Err_ThrowOnInvalidDispatch = 1 << 2 ,
  Err_LogOnInvalidArgument = 1 << 3 , Err_AssertOnInvalidArgument = 1 << 4 , Err_ThrowOnInvalidArgument = 1 << 5 , Err_LogOnFailedInvoke = 1 << 6 ,
  Err_AssertOnFailedInvoke = 1 << 7 , Err_ThrowOnFailedInvoke = 1 << 8 , Err_LogOnInvalidReturnType = 1 << 9 , Err_AssertOnInvalidReturnType = 1 << 10 ,
  Err_ThrowOnInvalidReturnType = 1 << 11 , Err_LogOnOtherError = 1 << 12 , Err_AssertOnOtherError = 1 << 13 , Err_ThrowOnOtherError = 1 << 14
}
 Flags affecting the behaviour of wxExcelObject and its descendants when an error occurs during accessing an Excel object property or calling its method. More...
 
- Static Public Member Functions inherited from wxAutoExcel::wxExcelObject
static unsigned GetErrorMode_ ()
 Sets the error mode to the combination of wxExcelObject::ErrorFlags. More...
 
static void SetErrorMode_ (unsigned mode)
 Sets the error mode as the combination of wxExcelObject::ErrorFlags. More...
 
static bool GetUnimplementedCollectionItem_ (wxAutomationObject &collection, const long index, wxAutomationObject &item, bool asProperty)
 Helper function for obtaining an item from MS Excel collection not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Detailed Description

Represents Microsoft Excel Style object.

Member Function Documentation

◆ Delete()

bool wxAutoExcel::wxExcelStyle::Delete ( )

◆ GetAddIndent()

bool wxAutoExcel::wxExcelStyle::GetAddIndent ( )

If true then text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.)

[MSDN documentation for Style.AddIndent]().

◆ SetAddIndent()

void wxAutoExcel::wxExcelStyle::SetAddIndent ( bool  addIndent)

If true then text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.)

[MSDN documentation for Style.AddIndent]().

◆ GetBorders()

wxExcelBorders wxAutoExcel::wxExcelStyle::GetBorders ( )

Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).

MSDN documentation for Style.Borders.

◆ GetBuiltIn()

bool wxAutoExcel::wxExcelStyle::GetBuiltIn ( )

Returns true if the style is one of the built-in ones.

MSDN documentation for Style.BuiltIn.

◆ GetFont()

wxExcelFont wxAutoExcel::wxExcelStyle::GetFont ( )

Returns a Font Represents the style font.

MSDN documentation for Style.Font.

◆ GetFormulaHidden()

bool wxAutoExcel::wxExcelStyle::GetFormulaHidden ( )

If true the formula will be hidden when the worksheet is protected.

MSDN documentation for Style.FormulaHidden.

◆ SetFormulaHidden()

void wxAutoExcel::wxExcelStyle::SetFormulaHidden ( bool  formulaHidden)

If true the formula will be hidden when the worksheet is protected.

MSDN documentation for Style.FormulaHidden.

◆ GetHorizontalAlignment()

XlHAlign wxAutoExcel::wxExcelStyle::GetHorizontalAlignment ( )

Returns a XlHAlign value that represents the horizontal alignment.

MSDN documentation for Style.HorizontalAlignment.

◆ SetHorizontalAlignment()

void wxAutoExcel::wxExcelStyle::SetHorizontalAlignment ( XlHAlign  horizontalAlignment)

Sets a XlHAlign value that represents the horizontal alignment.

MSDN documentation for Style.HorizontalAlignment.

◆ GetIncludeAlignment()

bool wxAutoExcel::wxExcelStyle::GetIncludeAlignment ( )

True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and Orientation properties.

MSDN documentation for Style.IncludeAlignment.

◆ SetIncludeAlignment()

void wxAutoExcel::wxExcelStyle::SetIncludeAlignment ( bool  includeAlignment)

True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and Orientation properties.

MSDN documentation for Style.IncludeAlignment.

◆ GetIncludeBorder()

bool wxAutoExcel::wxExcelStyle::GetIncludeBorder ( )

True if the style includes the Color, ColorIndex, LineStyle, and Weight border properties.

MSDN documentation for Style.IncludeBorder.

◆ SetIncludeBorder()

void wxAutoExcel::wxExcelStyle::SetIncludeBorder ( bool  includeBorder)

True if the style includes the Color, ColorIndex, LineStyle, and Weight border properties.

MSDN documentation for Style.IncludeBorder.

◆ GetIncludeFont()

bool wxAutoExcel::wxExcelStyle::GetIncludeFont ( )

True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties.

MSDN documentation for Style.IncludeFont.

◆ SetIncludeFont()

void wxAutoExcel::wxExcelStyle::SetIncludeFont ( bool  includeFont)

True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties.

MSDN documentation for Style.IncludeFont.

◆ GetIncludeNumber()

bool wxAutoExcel::wxExcelStyle::GetIncludeNumber ( )

True if the style includes the NumberFormat property.

MSDN documentation for Style.IncludeNumber.

◆ SetIncludeNumber()

void wxAutoExcel::wxExcelStyle::SetIncludeNumber ( bool  includeNumber)

True if the style includes the NumberFormat property.

Read/write Boolean

MSDN documentation for Style.IncludeNumber.

◆ GetIncludePatterns()

bool wxAutoExcel::wxExcelStyle::GetIncludePatterns ( )

True if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.

MSDN documentation for Style.IncludePatterns.

◆ SetIncludePatterns()

void wxAutoExcel::wxExcelStyle::SetIncludePatterns ( bool  includePatterns)

True if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.

MSDN documentation for Style.IncludePatterns.

◆ GetIncludeProtection()

bool wxAutoExcel::wxExcelStyle::GetIncludeProtection ( )

True if the style includes the FormulaHidden and Locked protection properties.

MSDN documentation for Style.IncludeProtection.

◆ SetIncludeProtection()

void wxAutoExcel::wxExcelStyle::SetIncludeProtection ( bool  includeProtection)

True if the style includes the FormulaHidden and Locked protection properties.

MSDN documentation for Style.IncludeProtection.

◆ GetIndentLevel()

long wxAutoExcel::wxExcelStyle::GetIndentLevel ( )

Returns a the indent level for the style.

MSDN documentation for Style.IndentLevel.

◆ SetIndentLevel()

void wxAutoExcel::wxExcelStyle::SetIndentLevel ( long  indentLevel)

Sets the indent level for the style.

MSDN documentation for Style.IndentLevel.

◆ GetInterior()

wxExcelInterior wxAutoExcel::wxExcelStyle::GetInterior ( )

Returns an Interior Represents the style interior.

MSDN documentation for Style.Interior.

◆ GetLocked()

bool wxAutoExcel::wxExcelStyle::GetLocked ( )

True if the style is locked.

MSDN documentation for Style.Locked.

◆ SetLocked()

void wxAutoExcel::wxExcelStyle::SetLocked ( bool  locked)

True if the style is locked.

MSDN documentation for Style.Locked.

◆ GetMergeCells()

bool wxAutoExcel::wxExcelStyle::GetMergeCells ( )

True if the style contains merged cells.

MSDN documentation for Style.MergeCells.

◆ GetName()

wxString wxAutoExcel::wxExcelStyle::GetName ( )

Returns the name of the object.

MSDN documentation for Style.Name.

◆ GetNameLocal()

wxString wxAutoExcel::wxExcelStyle::GetNameLocal ( )

Returns the name of the object, in the language of the user.

MSDN documentation for Style.NameLocal.

◆ GetNumberFormat()

wxString wxAutoExcel::wxExcelStyle::GetNumberFormat ( )

Returns a value that represents the format code for the object.

MSDN documentation for Style.NumberFormat.

◆ SetNumberFormat()

void wxAutoExcel::wxExcelStyle::SetNumberFormat ( const wxString &  numberFormat)

Sets a value that represents the format code for the object.

MSDN documentation for Style.NumberFormat.

◆ GetNumberFormatLocal()

wxString wxAutoExcel::wxExcelStyle::GetNumberFormatLocal ( )

Returns a value that represents the format code for the object as a string in the language of the user.

MSDN documentation for Style.NumberFormatLocal.

◆ SetNumberFormatLocal()

void wxAutoExcel::wxExcelStyle::SetNumberFormatLocal ( const wxString &  numberFormatLocal)

Sets a value that represents the format code for the object as a string in the language of the user.

MSDN documentation for Style.NumberFormatLocal.

◆ GetOrientation()

XlOrientation wxAutoExcel::wxExcelStyle::GetOrientation ( )

Returns the text orientation.

MSDN documentation for Style.Orientation.

◆ SetOrientation()

void wxAutoExcel::wxExcelStyle::SetOrientation ( XlOrientation  orientation)

Sets athe text orientation.

MSDN documentation for Style.Orientation.

◆ GetReadingOrder()

long wxAutoExcel::wxExcelStyle::GetReadingOrder ( )

Returns the style reading order.

Can be one of the following constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext.

MSDN documentation for Style.ReadingOrder.

◆ SetReadingOrder()

void wxAutoExcel::wxExcelStyle::SetReadingOrder ( long  readingOrder)

Sets the style reading order.

Can be one of the following constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext.

MSDN documentation for Style.ReadingOrder.

◆ GetShrinkToFit()

bool wxAutoExcel::wxExcelStyle::GetShrinkToFit ( )

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

MSDN documentation for Style.ShrinkToFit.

◆ SetShrinkToFit()

void wxAutoExcel::wxExcelStyle::SetShrinkToFit ( bool  shrinkToFit)

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

MSDN documentation for Style.ShrinkToFit.

◆ GetVerticalAlignment()

XlVAlign wxAutoExcel::wxExcelStyle::GetVerticalAlignment ( )

Returns the style vertical alignment.

MSDN documentation for Style.VerticalAlignment.

◆ SetVerticalAlignment()

void wxAutoExcel::wxExcelStyle::SetVerticalAlignment ( XlVAlign  verticalAlignment)

Sets the style vertical alignment.

MSDN documentation for Style.VerticalAlignment.

◆ GetWrapText()

bool wxAutoExcel::wxExcelStyle::GetWrapText ( )

True if Microsoft Excel wraps the text.

MSDN documentation for Style.WrapText.

◆ SetWrapText()

void wxAutoExcel::wxExcelStyle::SetWrapText ( bool  wrapText)

True if Microsoft Excel wraps the text.

MSDN documentation for Style.WrapText.

◆ GetAutoExcelObjectName_()

virtual wxString wxAutoExcel::wxExcelStyle::GetAutoExcelObjectName_ ( ) const
inlinevirtual

Returns "Style".

Reimplemented from wxAutoExcel::wxExcelObject.