-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
I just spot this, I think there should be an error handler for this
// ...... some codes here ......
// === define columns ===
worksheet.columns = [
{ header: 'Id', key: 'id', width: 10 },
{ header: 'Name', key: 'name', width: 32 },
{ header: 'D.O.B.', Key: 'DOB', width: 10 }, // <-- we should've use 'key' instead of 'Key', but when I use 'Key' there are no errors
];
// === when inserting values for each row ===
worksheet.addRow({ id: 1, name: 'John Doe', DOB: new Date(1970, 1, 1) });
worksheet.addRow({ id: 2, name: 'Jane Doe', DOB: new Date(1965, 1, 7) });
worksheet.addRow({ id: 3, name: 'John Doe', DOB: new Date(1970, 3, 1) });
worksheet.addRow({ id: 4, name: 'Jane Doe', DOB: new Date(1965, 4, 7) });
// ...... some codes here ......
it took me hours to debug it.
Best Regards
Levi