Would be handy to be able to turn the sheet into an array of arrays.
for (const row of xlsx.utils.sheet_to_aoa(s)) {
for (const cell of row) {
//...
}
}
May also help with #1234
Here is a workaround implementation via tab-separated-values:
const xlsx = require('xlsx')
function sheet_to_aoa(sheet) {
const FS = '\t'
return xlsx.utils.sheet_to_csv(sheet, {FS}).split('\n').map(r => r.split(FS))
}
Just found out about header: 1 in sheet_to_json, so above can become:
function sheet_to_aoa(sheet) {
return xlsx.utils.sheet_to_json(sheet, {header: 1})
}
Most helpful comment
Just found out about
header: 1in sheet_to_json, so above can become: