Aspose::Cells::ErrorCheckOption class

ErrorCheckOption class

Error check setting applied on certain ranges.

class ErrorCheckOption

Methods

MethodDescription
AddRange(const CellArea& ca)Adds one influenced range by this setting.
ErrorCheckOption(ErrorCheckOption_Impl* impl)Constructs from an implementation object.
ErrorCheckOption(const ErrorCheckOption& src)Copy constructor.
GetCountOfRange()Gets the count of ranges that influenced by this setting.
GetRange(int32_t index)Gets the influenced range of this setting by given index.
IsErrorCheck(ErrorCheckType errorCheckType)Checks whether given error type will be checked.
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const ErrorCheckOption& src)operator=
RemoveRange(int32_t index)Removes one range by given index.
SetErrorCheck(ErrorCheckType errorCheckType, bool isCheck)Sets whether given error type will be checked.
~ErrorCheckOption()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
Workbook workbook;
ErrorCheckOptionCollection opts = workbook.GetWorksheets().Get(0).GetErrorCheckOptions();
int optionIdx = opts.Add();
ErrorCheckOption opt = opts.Get(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);

CellArea ca = CellArea::CreateCellArea(u"A1", u"B10");
opt.AddRange(ca);
workbook.Save(u"Book1.xlsx");

Aspose::Cells::Cleanup();

See Also