Allow to set custom sheet name

This commit is contained in:
Jan Oberhauser 2019-12-27 10:33:16 -06:00
parent 72cf325247
commit 4a43738829

View file

@ -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: {