fix(Spreadsheet File Node): Fix include empty cells not working with v2 (#7505)

Github issue / Community forum post (link here to close automatically):
Ticket#763644
This commit is contained in:
Jon
2023-10-24 14:22:45 +01:00
committed by GitHub
parent 8ff9f97493
commit 05e6f2a6ac
4 changed files with 109 additions and 0 deletions

View File

@@ -92,6 +92,11 @@ export class SpreadsheetFileV2 implements INodeType {
to: maxRowCount > -1 ? maxRowCount : undefined,
columns: options.headerRow !== false,
onRecord: (record) => {
if (!options.includeEmptyCells) {
record = Object.fromEntries(
Object.entries(record).filter(([_key, value]) => value !== ''),
);
}
rows.push(record);
},
});