Rows and errors return undefined values using schema to convert data in json
Lysiah opened this issue · comments
Léa commented
Hi!
I tried to use a schema to transform excel data in json as stated in the documentation, but rows and errors return undefined
value.
readXlsxFile(file, { schema }).then(({ rows, errors }) => {
// `errors` have shape `{ row, column, error, value }`.
errors.length === 0
rows === [{
date: new Date(2018, 2, 24),
numberOfStudents: 123,
course: {
isFree: true,
title: 'Chemistry'
},
contact: '+11234567890',
}]
})
Does anyone have the same problem I do?
Nikolay commented
You can put up an online demo if you want someone to look at it.
Léa commented
Damn it! It was a mistake on my part on schema
key. Sorry for the inconvenience, it works perfectly, thanks :)