Aspose::Cells::IErrorCheckOption Class Referenceabstract

Error check setting applied on certain ranges. More...

Inherits Object.

Public Member Functions

virtual bool IsErrorCheck (Aspose::Cells::ErrorCheckType errorCheckType)=0
 Checks whether given error type will be checked. More...
 
virtual void SetErrorCheck (Aspose::Cells::ErrorCheckType errorCheckType, bool isCheck)=0
 Sets whether given error type will be checked. More...
 
virtual Aspose::Cells::Systems::Int32 GetCountOfRange ()=0
 Gets the count of ranges that influenced by this setting. More...
 
virtual Aspose::Cells::Systems::Int32 AddIRange (intrusive_ptr< Aspose::Cells::ICellArea > ca)=0
 Adds one influenced range by this setting. More...
 
virtual intrusive_ptr< Aspose::Cells::ICellAreaGetIRange (Aspose::Cells::Systems::Int32 index)=0
 Gets the influenced range of this setting by given index. More...
 
virtual void RemoveRange (Aspose::Cells::Systems::Int32 index)=0
 Removes one range by given index. More...
 

Detailed Description

Error check setting applied on certain ranges.

[C++]
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
intrusive_ptr<IErrorCheckOptionCollection> opts = workbook->GetIWorksheets()->GetObjectByIndex(0)->GetIErrorCheckOptions();
int optionIdx = opts->Add();
intrusive_ptr<IErrorCheckOption> opt = opts->GetObjectByIndex(optionIdx);
opt->SetErrorCheck(ErrorCheckType_InconsistFormula, false);
opt->SetErrorCheck(ErrorCheckType_InconsistRange, false);
opt->SetErrorCheck(ErrorCheckType_TextDate, false);
opt->SetErrorCheck(ErrorCheckType_TextNumber, false);
opt->SetErrorCheck(ErrorCheckType_Validation, false);
opt->AddRange(ICellArea::CreateICellArea(new String("A1"), new String("B10")));
workbook->Save(new String("D:\\Book1.xlsx"));

Member Function Documentation

◆ AddIRange()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IErrorCheckOption::AddIRange ( intrusive_ptr< Aspose::Cells::ICellArea ca)
pure virtual

Adds one influenced range by this setting.

Parameters
cathe range to be added.
Returns
the index of the added range in the range list of this setting.

◆ GetCountOfRange()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IErrorCheckOption::GetCountOfRange ( )
pure virtual

Gets the count of ranges that influenced by this setting.

Returns
the count of ranges that influenced by this setting.

◆ GetIRange()

virtual intrusive_ptr<Aspose::Cells::ICellArea> Aspose::Cells::IErrorCheckOption::GetIRange ( Aspose::Cells::Systems::Int32  index)
pure virtual

Gets the influenced range of this setting by given index.

Parameters
indexthe index of range
Returns
return influenced range at given index.

◆ IsErrorCheck()

virtual bool Aspose::Cells::IErrorCheckOption::IsErrorCheck ( Aspose::Cells::ErrorCheckType  errorCheckType)
pure virtual

Checks whether given error type will be checked.

Parameters
errorCheckTypeerror type can be checked
Returns
return true if given error type will be checked(green triangle will be shown for cell if the check failed).

◆ RemoveRange()

virtual void Aspose::Cells::IErrorCheckOption::RemoveRange ( Aspose::Cells::Systems::Int32  index)
pure virtual

Removes one range by given index.

Parameters
indexthe index of the range to be removed.

◆ SetErrorCheck()

virtual void Aspose::Cells::IErrorCheckOption::SetErrorCheck ( Aspose::Cells::ErrorCheckType  errorCheckType,
bool  isCheck 
)
pure virtual

Sets whether given error type will be checked.

Parameters
errorCheckTypeerror type can be checked.
isChecktrue if given error type needs to be checked(green triangle will be shown for cell if the check failed).