isListInFormula property

bool isListInFormula
getter/setter pair

Gets or sets the isListInFormula which is used both internally and externally.

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

//Accessing the first cell in worksheet and applying the Formula with Between property
final DataValidation listValidation =
    sheet.getRangeByName('A1').dataValidation;

//sets the allowType
listValidation.allowType = ExcelDataValidationType.user;


//sets the listofValues
listValidation.listOfValues = <String>['List1', 'List2', 'List3'];

//True if dataValiadation's ListOfValues property has a value
           if(dataValidation.IsListInFormula)
           {
              //Your code here
           }
//Save and dispose Workbook
final List<int> bytes = workbook.saveAsStream();
saveAsExcel(bytes, 'ExcelFormulaValidationbetween.xlsx');
workbook.dispose();

Implementation

late bool isListInFormula;