Closed jrgonzalezrios closed 2 years ago
Hi I am trying to specify a list of known headers like this:
var writer = csvWriter({ headers: ["header1", "header2", "header3"]}) writer.pipe(fs.createWriteStream('out.csv')) writer.write([ { header1: 'value1', header2: 'value2' }, { header1: 'value3', header2: 'value4', header3: 'value5', } ]) writer.end()
so the output would have a:
header1, header2, header3 value1, value2, value3, value4, value5
As you can see the first row does not have the header3, but should add an empty value for column 'header3'
Hi I am trying to specify a list of known headers like this:
so the output would have a:
header1, header2, header3 value1, value2, value3, value4, value5
As you can see the first row does not have the header3, but should add an empty value for column 'header3'