Added includeEmptyCells to Spreadsheet node (#1249)

* Added description to ShopifyCredentials subdomain

* Added includeEmptyCells to Spreadsheet node
This commit is contained in:
AxelRueweler 2020-12-12 08:16:06 +01:00 committed by GitHub
parent c90da82a7b
commit 35f6fe8298
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,6 +206,20 @@ export class SpreadsheetFile implements INodeType {
default: '',
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',
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);
// Check if data could be found in file