From 95c40b1fdeff1411c9527b6bc0ffba61ddea9bd0 Mon Sep 17 00:00:00 2001 From: DarkSorrow Date: Mon, 12 Jul 2021 12:40:11 +0200 Subject: [PATCH] Fix bug when passing a date I think there is a typo when the date has to be converted, it's the v that should be used and not the cell.v as it doesn't exist yet --- src/ExcelPlugin/utils/DataUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExcelPlugin/utils/DataUtil.js b/src/ExcelPlugin/utils/DataUtil.js index 1b84b13..531a66c 100644 --- a/src/ExcelPlugin/utils/DataUtil.js +++ b/src/ExcelPlugin/utils/DataUtil.js @@ -143,7 +143,7 @@ function getCell(v, cellRef, ws) { } else if (v instanceof Date) { cell.t = "n"; cell.z = XLSX.SSF._table[14]; - cell.v = dateToNumber(cell.v); + cell.v = dateToNumber(v); } else if (typeof v === "object") { cell.v = v.value; cell.s = v.style;