-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
When I write the row of header in CSV file it add extra row after the headers:
here is my function:
`export async function writeCsvHeaderWithCsvWriter(filename, columns) {
const filePath = getPath(filename);
const csvWriterFile = createObjectCsvWriter({
path: filePath,
append: true,
header: _.map([...columns], (col) => ({ id: col, title: col })),
alwaysQuote: true,
});
const headerRow = {};
_.forEach([...columns], (col) => _.extend(headerRow, { [col]: col }));
await csvWriterFile.writeRecords([headerRow]);
return csvWriterFile;
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels