feat(Spreadsheet File Node): Improve CSV parsing (#7448)

This adds support for
1. custom delimiters
2. reading offsets to avoid having to read a large CSV all at once
3. excluding byte-order-mark

NODE-861
#7443
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-18 16:57:37 +02:00
committed by GitHub
parent d8531a53b9
commit 79f23fb939
6 changed files with 273 additions and 15 deletions

View File

@@ -201,6 +201,59 @@ export const optionsProperties: INodeProperties[] = [
default: true,
description: 'Whether the first row of the file contains the header names',
},
{
displayName: 'Delimiter',
name: 'delimiter',
type: 'string',
displayOptions: {
show: {
'/operation': ['fromFile'],
'/fileFormat': ['csv'],
},
},
default: ',',
description: 'Set the field delimiter',
},
{
displayName: 'Starting Line',
name: 'fromLine',
type: 'number',
displayOptions: {
show: {
'/operation': ['fromFile'],
'/fileFormat': ['csv'],
},
},
default: 0,
description: 'Start handling records from the requested line number',
},
{
displayName: 'Max Number of Rows to Load',
name: 'maxRowCount',
type: 'number',
displayOptions: {
show: {
'/operation': ['fromFile'],
'/fileFormat': ['csv'],
},
},
default: -1,
description: 'Stop handling records after the requested number of rows are read',
},
{
displayName: 'Exclude Byte Order Mark (BOM)',
name: 'enableBOM',
type: 'boolean',
displayOptions: {
show: {
'/operation': ['fromFile'],
'/fileFormat': ['csv'],
},
},
default: false,
description:
'Whether to detect and exclude the byte-order-mark from the CSV Input if present',
},
{
displayName: 'Include Empty Cells',
name: 'includeEmptyCells',