I am facing a weird issue in xlsx while converting an array of objects to an excel
Input array
const input=[{id:1,DOb:'02/23/1984'},{id:2,DOb:'02/23/1985'},{id:3,DOb:'02/23/1985'},{id:4,DOb:'02/23/1940'}]
In the output excel file, the DOB value is trimmed for some rows,
The above example returns the DOB value in excel is 02/23/40 for the input 02/23/1940.
As you see the year 1940 is trimmed to 40 What I need to exact version of the input ie 1940.
Here is the code
const workSheet = XLSX.utils.json_to_sheet(input)
const wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, workSheet, 'Sheet1')
XLSX.writeFile(wb, path)