Open pmg1407 opened 6 years ago
Date data validation formula's require the value to be the Excel timestamp. This should work for you.
var Excel = require('excel4node');
const wb = new Excel.Workbook();
const ws = wb.addWorksheet('worksheet');
ws.addDataValidation({
type: 'date',
allowBlank: false,
error: 'My Error Message',
sqref: 'D2:D100',
operator: 'lessThan',
formulas: [Excel.getExcelTS(new Date("2018-07-07T00:00:00.0000Z"))]
})
ws.cell(2, 4).date(new Date("2018-07-08T00:00:00.0000Z"))
wb.write('date_validation.xlsx');
Wow! It's working perfectly. Thank you so much @natergj
@pmg1407, I see that you've re-opened this issue after closing it. Are you still have issues with date validations?