From 4a4373882940f2c5fe0c07b8391805ceacf62cdd Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 27 Dec 2019 10:33:16 -0600 Subject: [PATCH] :zap: Allow to set custom sheet name --- .../nodes-base/nodes/SpreadsheetFile.node.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/SpreadsheetFile.node.ts b/packages/nodes-base/nodes/SpreadsheetFile.node.ts index 18544091ed..2328b0a004 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile.node.ts @@ -196,6 +196,24 @@ export class SpreadsheetFile implements INodeType { default: false, description: 'If the data should be returned RAW instead of parsed.', }, + { + displayName: 'Sheet Name', + name: 'sheetName', + type: 'string', + displayOptions: { + show: { + '/operation': [ + 'toFile', + ], + '/fileFormat': [ + 'ods', + 'xls', + ], + }, + }, + default: 'Sheet', + description: 'Name of the Sheet in the Spreadsheet.', + }, ], }, ] @@ -282,7 +300,7 @@ export class SpreadsheetFile implements INodeType { } // Convert the data in the correct format - const sheetName = 'Sheet'; + const sheetName = options.sheetName as string || 'Sheet'; const wb: WorkBook = { SheetNames: [sheetName], Sheets: {