firstDateTime property

DateTime firstDateTime
getter/setter pair

Gets or sets the firstDateTime.

//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 date properties
final DataValidation dateValidation =
    sheet.getRangeByName('A1').dataValidation;

//sets the allowType
dateValidation.allowType = ExcelDataValidationType.date;

//sets the comparisonOperator
dateValidation.comparisonperator =
    ExcelDataValidationComparisonOperator.between;

//sets the firstDate
dateValidation.firstDateTime = DateTime(1997, 07, 22);

//sets the secondDate
dateValidation.secondDateTime = DateTime(1997, 07, 25);

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

Implementation

late DateTime firstDateTime;