mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
⚡ Added includeEmptyCells to Spreadsheet node (#1249)
* Added description to ShopifyCredentials subdomain * Added includeEmptyCells to Spreadsheet node
This commit is contained in:
parent
c90da82a7b
commit
35f6fe8298
|
@ -206,6 +206,20 @@ export class SpreadsheetFile implements INodeType {
|
||||||
default: '',
|
default: '',
|
||||||
description: 'File name to set in binary data. By default will "spreadsheet.<fileFormat>" be used.',
|
description: 'File name to set in binary data. By default will "spreadsheet.<fileFormat>" be used.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Include empty cells',
|
||||||
|
name: 'includeEmptyCells',
|
||||||
|
type: 'boolean',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
'/operation': [
|
||||||
|
'fromFile',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default: false,
|
||||||
|
description: 'When reading from file the empty cells will be filled with an empty string in the JSON.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'RAW Data',
|
displayName: 'RAW Data',
|
||||||
name: 'rawData',
|
name: 'rawData',
|
||||||
|
@ -341,6 +355,10 @@ export class SpreadsheetFile implements INodeType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.includeEmptyCells) {
|
||||||
|
sheetToJsonOptions.defval = '';
|
||||||
|
}
|
||||||
|
|
||||||
const sheetJson = xlsxUtils.sheet_to_json(workbook.Sheets[sheetName], sheetToJsonOptions);
|
const sheetJson = xlsxUtils.sheet_to_json(workbook.Sheets[sheetName], sheetToJsonOptions);
|
||||||
|
|
||||||
// Check if data could be found in file
|
// Check if data could be found in file
|
||||||
|
|
Loading…
Reference in a new issue