Aspose::Cells::IValidation Class Referenceabstract

Represents data validation settings. More...

Inherits Object.

Public Member Functions

virtual Aspose::Cells::OperatorType GetOperator ()=0
 Represents the operator for the data validation. More...
 
virtual void SetOperator (Aspose::Cells::OperatorType value)=0
 Represents the operator for the data validation. More...
 
virtual Aspose::Cells::ValidationAlertType GetAlertStyle ()=0
 Represents the validation alert style. More...
 
virtual void SetAlertStyle (Aspose::Cells::ValidationAlertType value)=0
 Represents the validation alert style. More...
 
virtual Aspose::Cells::ValidationType GetType ()=0
 Represents the data validation type. More...
 
virtual void SetType (Aspose::Cells::ValidationType value)=0
 Represents the data validation type. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetInputMessage ()=0
 Represents the data validation input message. More...
 
virtual void SetInputMessage (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the data validation input message. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetInputTitle ()=0
 Represents the title of the data-validation input dialog box. More...
 
virtual void SetInputTitle (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the title of the data-validation input dialog box. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetErrorMessage ()=0
 Represents the data validation error message. More...
 
virtual void SetErrorMessage (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the data validation error message. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetErrorTitle ()=0
 Represents the title of the data-validation error dialog box. More...
 
virtual void SetErrorTitle (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the title of the data-validation error dialog box. More...
 
virtual bool GetShowInput ()=0
 Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range. More...
 
virtual void SetShowInput (bool value)=0
 Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range. More...
 
virtual bool GetShowError ()=0
 Indicates whether the data validation error message will be displayed whenever the user enters invalid data. More...
 
virtual void SetShowError (bool value)=0
 Indicates whether the data validation error message will be displayed whenever the user enters invalid data. More...
 
virtual bool GetIgnoreBlank ()=0
 Indicates whether blank values are permitted by the range data validation. More...
 
virtual void SetIgnoreBlank (bool value)=0
 Indicates whether blank values are permitted by the range data validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula1 (bool isR1C1, bool isLocal)=0
 Gets the value or expression associated with this validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula2 (bool isR1C1, bool isLocal)=0
 Gets the value or expression associated with this validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula1 (bool isR1C1, bool isLocal, Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Gets the value or expression associated with this validation for specific cell. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula2 (bool isR1C1, bool isLocal, Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Gets the value or expression associated with this validation for specific cell. More...
 
virtual void SetFormula1 (intrusive_ptr< Aspose::Cells::Systems::String > formula, bool isR1C1, bool isLocal)=0
 Sets the value or expression associated with this validation. More...
 
virtual void SetFormula2 (intrusive_ptr< Aspose::Cells::Systems::String > formula, bool isR1C1, bool isLocal)=0
 Sets the value or expression associated with this validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula1 ()=0
 Represents the value or expression associated with the data validation. More...
 
virtual void SetFormula1 (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the value or expression associated with the data validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFormula2 ()=0
 Represents the value or expression associated with the data validation. More...
 
virtual void SetFormula2 (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Represents the value or expression associated with the data validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Object > GetListValue (Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Get the value for list of the validation for the specified cell. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Object > GetValue1 ()=0
 Represents the first value associated with the data validation. More...
 
virtual void SetValue1 (intrusive_ptr< Aspose::Cells::Systems::Object > value)=0
 Represents the first value associated with the data validation. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Object > GetValue2 ()=0
 Represents the second value associated with the data validation. More...
 
virtual void SetValue2 (intrusive_ptr< Aspose::Cells::Systems::Object > value)=0
 Represents the second value associated with the data validation. More...
 
virtual bool GetInCellDropDown ()=0
 Indicates whether data validation displays a drop-down list that contains acceptable values. More...
 
virtual void SetInCellDropDown (bool value)=0
 Indicates whether data validation displays a drop-down list that contains acceptable values. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::ICellArea * > > GetICellAreas ()=0
 Gets all ICellArea which contain the data validation settings. More...
 
virtual void AddArea (intrusive_ptr< Aspose::Cells::ICellArea > cellArea)=0
 Applies the validation to the area. More...
 
virtual void AddArea (intrusive_ptr< Aspose::Cells::ICellArea > cellArea, bool checkIntersection, bool checkEdge)=0
 Applies the validation to the area. More...
 
virtual void AddAreas (intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::ICellArea *>> areas, bool checkIntersection, bool checkEdge)=0
 Applies the validation to given areas. More...
 
virtual void RemoveArea (intrusive_ptr< Aspose::Cells::ICellArea > cellArea)=0
 Remove the validation settings in the range. More...
 
virtual void RemoveAreas (intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::ICellArea *>> areas)=0
 Removes this validation from given areas. More...
 
virtual void RemoveACell (Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Remove the validation settings in the cell. More...
 
virtual void Copy (intrusive_ptr< Aspose::Cells::IValidation > source, intrusive_ptr< Aspose::Cells::ICopyOptions > copyOption)=0
 Copy validation. More...
 

Detailed Description

Represents data validation settings.

[C++]
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
intrusive_ptr<IValidationCollection> validations = workbook->GetIWorksheets()->GetObjectByIndex(0)->GetIValidations();
intrusive_ptr<IValidation> validation = validations->GetObjectByIndex(validations->Add());
validation->SetType(ValidationType_WholeNumber);
validation->SetOperator(OperatorType_Between);
validation->SetFormula1(new String("3"));
validation->SetFormula2(new String("1234"));

Member Function Documentation

◆ AddArea() [1/2]

virtual void Aspose::Cells::IValidation::AddArea ( intrusive_ptr< Aspose::Cells::ICellArea cellArea)
pure virtual

Applies the validation to the area.

Parameters
cellAreaThe area.

It is equivalent to use AddArea(Aspose.Cells.CellArea,bool,bool)

with checking intersection and edge.

◆ AddArea() [2/2]

virtual void Aspose::Cells::IValidation::AddArea ( intrusive_ptr< Aspose::Cells::ICellArea cellArea,
bool  checkIntersection,
bool  checkEdge 
)
pure virtual

Applies the validation to the area.

Parameters
cellAreaThe area.
checkIntersectionWhether check the intersection of given area with existing validations' areas. If one validation has been applied in given area(or part of it), then the existing validation should be removed at first from given area. Otherwise corruption may be caused for the generated Validations. If user is sure that the added area does not intersect with any existing area, this parameter can be set as false for performance consideration.
checkEdgeWhether check the edge of this validation's applied areas. Validation's internal settings depend on the top-left one of its applied ranges, so if given area will become the new top-left one of the applied ranges, the internal settings should be changed and rebuilt, otherwise unexpected result may be caused. If user is sure that the added area is not the top-left one, this parameter can be set as false for performance consideration.

In this method, we will remove all old validations in given area. For the top-left one of Validation's applied ranges, firstly its StartRow is smallest, secondly its StartColumn is the smallest one of those areas who have the same smallest StartRow.

◆ AddAreas()

virtual void Aspose::Cells::IValidation::AddAreas ( intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::ICellArea *>>  areas,
bool  checkIntersection,
bool  checkEdge 
)
pure virtual

Applies the validation to given areas.

Parameters
areasThe areas.
checkIntersectionWhether check the intersection of given area with existing validations' areas. If one validation has been applied in given area(or part of it), then the existing validation should be removed at first from given area. Otherwise corruption may be caused for the generated Validations. If user is sure that all the added areas do not intersect with any existing area, this parameter can be set as false for performance consideration.
checkEdgeWhether check the edge of this validation's applied areas. Validation's internal settings depend on the top-left one of its applied ranges, so if one of given areas will become the new top-left one of the applied ranges, the internal settings should be changed and rebuilt, otherwise unexpected result may be caused. If user is sure that no one of those added areas is the top-left, this parameter can be set as false for performance consideration.

In this method, we will remove all old validations in given area. For the top-left one of Validation's applied ranges, firstly its StartRow is smallest, secondly its StartColumn is the smallest one of those areas who have the same smallest StartRow.

◆ Copy()

virtual void Aspose::Cells::IValidation::Copy ( intrusive_ptr< Aspose::Cells::IValidation source,
intrusive_ptr< Aspose::Cells::ICopyOptions copyOption 
)
pure virtual

Copy validation.

Parameters
sourceThe source validation.
copyOptionThe copy option.

◆ GetAlertStyle()

virtual Aspose::Cells::ValidationAlertType Aspose::Cells::IValidation::GetAlertStyle ( )
pure virtual

Represents the validation alert style.

◆ GetErrorMessage()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetErrorMessage ( )
pure virtual

Represents the data validation error message.

◆ GetErrorTitle()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetErrorTitle ( )
pure virtual

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

◆ GetFormula1() [1/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula1 ( bool  isR1C1,
bool  isLocal 
)
pure virtual

Gets the value or expression associated with this validation.

Parameters
isR1C1Whether the formula needs to be formatted as R1C1.
isLocalWhether the formula needs to be formatted by locale.
Returns
The value or expression associated with this validation.

◆ GetFormula1() [2/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula1 ( bool  isR1C1,
bool  isLocal,
Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Gets the value or expression associated with this validation for specific cell.

Parameters
isR1C1Whether the formula needs to be formatted as R1C1.
isLocalWhether the formula needs to be formatted by locale.
rowThe row index.
columnThe column index.
Returns
The value or expression associated with this validation.

◆ GetFormula1() [3/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula1 ( )
pure virtual

Represents the value or expression associated with the data validation.

◆ GetFormula2() [1/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula2 ( bool  isR1C1,
bool  isLocal 
)
pure virtual

Gets the value or expression associated with this validation.

Parameters
isR1C1Whether the formula needs to be formatted as R1C1.
isLocalWhether the formula needs to be formatted by locale.
Returns
The value or expression associated with this validation.

◆ GetFormula2() [2/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula2 ( bool  isR1C1,
bool  isLocal,
Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Gets the value or expression associated with this validation for specific cell.

Parameters
isR1C1Whether the formula needs to be formatted as R1C1.
isLocalWhether the formula needs to be formatted by locale.
rowThe row index.
columnThe column index.
Returns
The value or expression associated with this validation.

◆ GetFormula2() [3/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetFormula2 ( )
pure virtual

Represents the value or expression associated with the data validation.

◆ GetICellAreas()

virtual intrusive_ptr<Aspose::Cells::Systems::Array1D<Aspose::Cells::ICellArea*> > Aspose::Cells::IValidation::GetICellAreas ( )
pure virtual

Gets all ICellArea which contain the data validation settings.

◆ GetIgnoreBlank()

virtual bool Aspose::Cells::IValidation::GetIgnoreBlank ( )
pure virtual

Indicates whether blank values are permitted by the range data validation.

◆ GetInCellDropDown()

virtual bool Aspose::Cells::IValidation::GetInCellDropDown ( )
pure virtual

Indicates whether data validation displays a drop-down list that contains acceptable values.

◆ GetInputMessage()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetInputMessage ( )
pure virtual

Represents the data validation input message.

◆ GetInputTitle()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IValidation::GetInputTitle ( )
pure virtual

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

◆ GetListValue()

virtual intrusive_ptr<Aspose::Cells::Systems::Object> Aspose::Cells::IValidation::GetListValue ( Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Get the value for list of the validation for the specified cell.

Parameters
rowThe row index.
columnThe column index.
Returns
The value to produce the list of this validation for the specified cell. If the list references to a range, then the returned value will be a IReferredArea object; Otherwise the returned value may be null, object[], or simple object.

Only for validation whose type is List and has been applied to given cell, otherwise null will be returned.

◆ GetOperator()

virtual Aspose::Cells::OperatorType Aspose::Cells::IValidation::GetOperator ( )
pure virtual

Represents the operator for the data validation.

◆ GetShowError()

virtual bool Aspose::Cells::IValidation::GetShowError ( )
pure virtual

Indicates whether the data validation error message will be displayed whenever the user enters invalid data.

◆ GetShowInput()

virtual bool Aspose::Cells::IValidation::GetShowInput ( )
pure virtual

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

◆ GetType()

virtual Aspose::Cells::ValidationType Aspose::Cells::IValidation::GetType ( )
pure virtual

Represents the data validation type.

◆ GetValue1()

virtual intrusive_ptr<Aspose::Cells::Systems::Object> Aspose::Cells::IValidation::GetValue1 ( )
pure virtual

Represents the first value associated with the data validation.

◆ GetValue2()

virtual intrusive_ptr<Aspose::Cells::Systems::Object> Aspose::Cells::IValidation::GetValue2 ( )
pure virtual

Represents the second value associated with the data validation.

◆ RemoveACell()

virtual void Aspose::Cells::IValidation::RemoveACell ( Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Remove the validation settings in the cell.

Parameters
rowThe row index.
columnThe column index.

◆ RemoveArea()

virtual void Aspose::Cells::IValidation::RemoveArea ( intrusive_ptr< Aspose::Cells::ICellArea cellArea)
pure virtual

Remove the validation settings in the range.

Parameters
cellAreathe areas where this validation settings should be removed.

◆ RemoveAreas()

virtual void Aspose::Cells::IValidation::RemoveAreas ( intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::ICellArea *>>  areas)
pure virtual

Removes this validation from given areas.

Parameters
areasthe areas where this validation settings should be removed.

◆ SetAlertStyle()

virtual void Aspose::Cells::IValidation::SetAlertStyle ( Aspose::Cells::ValidationAlertType  value)
pure virtual

Represents the validation alert style.

◆ SetErrorMessage()

virtual void Aspose::Cells::IValidation::SetErrorMessage ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Represents the data validation error message.

◆ SetErrorTitle()

virtual void Aspose::Cells::IValidation::SetErrorTitle ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

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

◆ SetFormula1() [1/2]

virtual void Aspose::Cells::IValidation::SetFormula1 ( intrusive_ptr< Aspose::Cells::Systems::String >  formula,
bool  isR1C1,
bool  isLocal 
)
pure virtual

Sets the value or expression associated with this validation.

Parameters
formulaThe value or expression associated with this format condition.
isR1C1Whether the formula is R1C1 formula.
isLocalWhether the formula is locale formatted.

◆ SetFormula1() [2/2]

virtual void Aspose::Cells::IValidation::SetFormula1 ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Represents the value or expression associated with the data validation.

◆ SetFormula2() [1/2]

virtual void Aspose::Cells::IValidation::SetFormula2 ( intrusive_ptr< Aspose::Cells::Systems::String >  formula,
bool  isR1C1,
bool  isLocal 
)
pure virtual

Sets the value or expression associated with this validation.

Parameters
formulaThe value or expression associated with this format condition.
isR1C1Whether the formula is R1C1 formula.
isLocalWhether the formula is locale formatted.

◆ SetFormula2() [2/2]

virtual void Aspose::Cells::IValidation::SetFormula2 ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Represents the value or expression associated with the data validation.

◆ SetIgnoreBlank()

virtual void Aspose::Cells::IValidation::SetIgnoreBlank ( bool  value)
pure virtual

Indicates whether blank values are permitted by the range data validation.

◆ SetInCellDropDown()

virtual void Aspose::Cells::IValidation::SetInCellDropDown ( bool  value)
pure virtual

Indicates whether data validation displays a drop-down list that contains acceptable values.

◆ SetInputMessage()

virtual void Aspose::Cells::IValidation::SetInputMessage ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Represents the data validation input message.

◆ SetInputTitle()

virtual void Aspose::Cells::IValidation::SetInputTitle ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

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

◆ SetOperator()

virtual void Aspose::Cells::IValidation::SetOperator ( Aspose::Cells::OperatorType  value)
pure virtual

Represents the operator for the data validation.

◆ SetShowError()

virtual void Aspose::Cells::IValidation::SetShowError ( bool  value)
pure virtual

Indicates whether the data validation error message will be displayed whenever the user enters invalid data.

◆ SetShowInput()

virtual void Aspose::Cells::IValidation::SetShowInput ( bool  value)
pure virtual

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

◆ SetType()

virtual void Aspose::Cells::IValidation::SetType ( Aspose::Cells::ValidationType  value)
pure virtual

Represents the data validation type.

◆ SetValue1()

virtual void Aspose::Cells::IValidation::SetValue1 ( intrusive_ptr< Aspose::Cells::Systems::Object >  value)
pure virtual

Represents the first value associated with the data validation.

◆ SetValue2()

virtual void Aspose::Cells::IValidation::SetValue2 ( intrusive_ptr< Aspose::Cells::Systems::Object >  value)
pure virtual

Represents the second value associated with the data validation.