secondFormula property

String secondFormula
getter/setter pair

Gets or sets the secondFormula

//Creating one worksheet and accessing the first sheet
final Workbook workbook = Workbook(1);
final Worksheet sheet = workbook.worksheets[0];

//Accessing the first cell in excel-sheet and applying the textLength with Between property
 final DataValidation textLengthValidation =
 sheet.getRangeByName('A1').dataValidation;

 //sets the allowType
 textLengthValidation.allowType = ExcelDataValidationType.textLength;

//sets the comparisonOperator
 textLengthValidation.comparisonOperator =
 ExcelDataValidationComparisonOperator.between;

//sets the firstFormula
 textLengthValidation.firstFormula = '1';

//sets the secondFormula
 textLengthValidation.secondFormula = '5';

//Save and dispose Workbook
final List<int> bytes = workbook.saveAsStream();
saveAsExcel(bytes, 'ExceldateValidation.xlsx');
workbook.dispose();

Implementation

late String secondFormula;