secondDateTime property

DateTime secondDateTime
getter/setter pair

Gets or sets the secondDateTime.

//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.comparisonOperator =
    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 secondDateTime;