mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Added includeEmptyCells to Spreadsheet node (#1249)
* Added description to ShopifyCredentials subdomain * Added includeEmptyCells to Spreadsheet node
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user