listOfValues property

List<String> listOfValues
getter/setter pair

Gets or sets the listOfValues for DataValidation

//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
listalidation.allowType = ExcelDataValidationType.user;


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

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

Implementation

late List<String> listOfValues;