wxAutoExcel  2.0.0
wxAutoExcel::wxExcelValidation Class Reference

Represents Microsoft Excel Validation object. More...

Inheritance diagram for wxAutoExcel::wxExcelValidation:
wxAutoExcel::wxExcelObject

Public Member Functions

void Add (XlDVType type, XlDVAlertStyle *alertStyle=NULL, XlFormatConditionOperator *conditionOperator=NULL, const wxString &formula1=wxEmptyString, const wxString &formula2=wxEmptyString)
 Adds data validation to the specified range. More...
 
void Delete ()
 Deletes the object. More...
 
void Modify (XlDVType *type=NULL, XlDVAlertStyle *alertStyle=NULL, XlFormatConditionOperator *conditionOperator=NULL, const wxString &formula1=wxEmptyString, const wxString &formula2=wxEmptyString)
 Modifies data validation for a range. More...
 
XlDVAlertStyle GetAlertStyle ()
 Returns the validation alert style. More...
 
wxString GetErrorMessage ()
 Returns the data validation error message. More...
 
void SetErrorMessage (const wxString &errorMessage)
 Sets the data validation error message. More...
 
wxString GetErrorTitle ()
 Returns the title of the data-validation error dialog box. More...
 
void SetErrorTitle (const wxString &errorTitle)
 Sets the title of the data-validation error dialog box. More...
 
wxString GetFormula1 ()
 Returns the value or expression associated with the conditional format or data validation. More...
 
wxString GetFormula2 ()
 Returns the value or expression associated with the second part of a conditional format or data validation. More...
 
bool GetIgnoreBlank ()
 True if blank values are permitted by the range data validation. More...
 
void SetIgnoreBlank (bool ignoreBlank)
 True if blank values are permitted by the range data validation. More...
 
XlIMEMode GetIMEMode ()
 Returns the description of the Japanese input rules. More...
 
void SetIMEMode (XlIMEMode iMEMode)
 Sets the description of the Japanese input rules. More...
 
bool GetInCellDropdown ()
 True if data validation displays a drop-down list that contains acceptable values. More...
 
void SetInCellDropdown (bool inCellDropdown)
 True if data validation displays a drop-down list that contains acceptable values. More...
 
wxString GetInputMessage ()
 Returns the data validation input message. More...
 
void SetInputMessage (const wxString &inputMessage)
 Sets the data validation input message. More...
 
wxString GetInputTitle ()
 Returns the title of the data-validation input dialog box. More...
 
void SetInputTitle (const wxString &inputTitle)
 Sets the title of the data-validation input dialog box. More...
 
long GetOperator ()
 Returns a Long value that represents the operator for the data validation. More...
 
bool GetShowError ()
 True if the data validation error message will be displayed whenever the user enters invalid data. More...
 
void SetShowError (bool showError)
 True if the data validation error message will be displayed whenever the user enters invalid data. More...
 
bool GetShowInput ()
 True if the data validation input message will be displayed whenever the user selects a cell in the data validation range. More...
 
void SetShowInput (bool showInput)
 True if the data validation input message will be displayed whenever the user selects a cell in the data validation range. More...
 
XlDVType GetType ()
 Returns a Long value, containing a XlDVType constant, that represents the data type validation for a range. More...
 
bool GetValue ()
 Returns a Boolean value that indicates if all the validation criteria are met (that is, if the range contains valid data). More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "Validation". 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 Validation object.

Member Function Documentation

◆ Add()

void wxAutoExcel::wxExcelValidation::Add ( XlDVType  type,
XlDVAlertStyle alertStyle = NULL,
XlFormatConditionOperator conditionOperator = NULL,
const wxString &  formula1 = wxEmptyString,
const wxString &  formula2 = wxEmptyString 
)

Adds data validation to the specified range.

MSDN documentation for Validation.Add.

◆ Delete()

void wxAutoExcel::wxExcelValidation::Delete ( )

◆ Modify()

void wxAutoExcel::wxExcelValidation::Modify ( XlDVType type = NULL,
XlDVAlertStyle alertStyle = NULL,
XlFormatConditionOperator conditionOperator = NULL,
const wxString &  formula1 = wxEmptyString,
const wxString &  formula2 = wxEmptyString 
)

Modifies data validation for a range.

MSDN documentation for Validation.Modify.

◆ GetAlertStyle()

XlDVAlertStyle wxAutoExcel::wxExcelValidation::GetAlertStyle ( )

Returns the validation alert style.

Read-only XlDVAlertStyle.

MSDN documentation for Validation.AlertStyle.

◆ GetErrorMessage()

wxString wxAutoExcel::wxExcelValidation::GetErrorMessage ( )

Returns the data validation error message.

MSDN documentation for Validation.ErrorMessage.

◆ SetErrorMessage()

void wxAutoExcel::wxExcelValidation::SetErrorMessage ( const wxString &  errorMessage)

Sets the data validation error message.

MSDN documentation for Validation.ErrorMessage.

◆ GetErrorTitle()

wxString wxAutoExcel::wxExcelValidation::GetErrorTitle ( )

Returns the title of the data-validation error dialog box.

MSDN documentation for Validation.ErrorTitle.

◆ SetErrorTitle()

void wxAutoExcel::wxExcelValidation::SetErrorTitle ( const wxString &  errorTitle)

Sets the title of the data-validation error dialog box.

MSDN documentation for Validation.ErrorTitle.

◆ GetFormula1()

wxString wxAutoExcel::wxExcelValidation::GetFormula1 ( )

Returns the value or expression associated with the conditional format or data validation.

Can be a constant value, a string value, a cell reference, or a formula.

MSDN documentation for Validation.Formula1.

◆ GetFormula2()

wxString wxAutoExcel::wxExcelValidation::GetFormula2 ( )

Returns the value or expression associated with the second part of a conditional format or data validation.

Used only when the data validation conditional format Operator property is xlBetween or xlNotBetween. Can be a constant value, a string value, a cell reference, or a formula.

MSDN documentation for Validation.Formula2.

◆ GetIgnoreBlank()

bool wxAutoExcel::wxExcelValidation::GetIgnoreBlank ( )

True if blank values are permitted by the range data validation.

MSDN documentation for Validation.IgnoreBlank.

◆ SetIgnoreBlank()

void wxAutoExcel::wxExcelValidation::SetIgnoreBlank ( bool  ignoreBlank)

True if blank values are permitted by the range data validation.

MSDN documentation for Validation.IgnoreBlank.

◆ GetIMEMode()

XlIMEMode wxAutoExcel::wxExcelValidation::GetIMEMode ( )

Returns the description of the Japanese input rules.

Can be one of the XlIMEMode constants listed in the following table.

MSDN documentation for Validation.IMEMode.

◆ SetIMEMode()

void wxAutoExcel::wxExcelValidation::SetIMEMode ( XlIMEMode  iMEMode)

Sets the description of the Japanese input rules.

Can be one of the XlIMEMode constants listed in the following table.

MSDN documentation for Validation.IMEMode.

◆ GetInCellDropdown()

bool wxAutoExcel::wxExcelValidation::GetInCellDropdown ( )

True if data validation displays a drop-down list that contains acceptable values.

MSDN documentation for Validation.InCellDropdown.

◆ SetInCellDropdown()

void wxAutoExcel::wxExcelValidation::SetInCellDropdown ( bool  inCellDropdown)

True if data validation displays a drop-down list that contains acceptable values.

MSDN documentation for Validation.InCellDropdown.

◆ GetInputMessage()

wxString wxAutoExcel::wxExcelValidation::GetInputMessage ( )

Returns the data validation input message.

MSDN documentation for Validation.InputMessage.

◆ SetInputMessage()

void wxAutoExcel::wxExcelValidation::SetInputMessage ( const wxString &  inputMessage)

Sets the data validation input message.

MSDN documentation for Validation.InputMessage.

◆ GetInputTitle()

wxString wxAutoExcel::wxExcelValidation::GetInputTitle ( )

Returns the title of the data-validation input dialog box.

MSDN documentation for Validation.InputTitle.

◆ SetInputTitle()

void wxAutoExcel::wxExcelValidation::SetInputTitle ( const wxString &  inputTitle)

Sets the title of the data-validation input dialog box.

MSDN documentation for Validation.InputTitle.

◆ GetOperator()

long wxAutoExcel::wxExcelValidation::GetOperator ( )

Returns a Long value that represents the operator for the data validation.

MSDN documentation for Validation.Operator.

◆ GetShowError()

bool wxAutoExcel::wxExcelValidation::GetShowError ( )

True if the data validation error message will be displayed whenever the user enters invalid data.

MSDN documentation for Validation.ShowError.

◆ SetShowError()

void wxAutoExcel::wxExcelValidation::SetShowError ( bool  showError)

True if the data validation error message will be displayed whenever the user enters invalid data.

MSDN documentation for Validation.ShowError.

◆ GetShowInput()

bool wxAutoExcel::wxExcelValidation::GetShowInput ( )

True if the data validation input message will be displayed whenever the user selects a cell in the data validation range.

MSDN documentation for Validation.ShowInput.

◆ SetShowInput()

void wxAutoExcel::wxExcelValidation::SetShowInput ( bool  showInput)

True if the data validation input message will be displayed whenever the user selects a cell in the data validation range.

MSDN documentation for Validation.ShowInput.

◆ GetType()

XlDVType wxAutoExcel::wxExcelValidation::GetType ( )

Returns a Long value, containing a XlDVType constant, that represents the data type validation for a range.

MSDN documentation for Validation.Type.

◆ GetValue()

bool wxAutoExcel::wxExcelValidation::GetValue ( )

Returns a Boolean value that indicates if all the validation criteria are met (that is, if the range contains valid data).

MSDN documentation for Validation.Value.

◆ GetAutoExcelObjectName_()

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

Returns "Validation".

Reimplemented from wxAutoExcel::wxExcelObject.