mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ added compression option
This commit is contained in:
parent
73edcdcbc4
commit
8e138ddf2d
|
@ -173,6 +173,24 @@ export class SpreadsheetFile implements INodeType {
|
|||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Compression',
|
||||
name: 'compression',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/operation': [
|
||||
'toFile',
|
||||
],
|
||||
'/fileFormat': [
|
||||
'xlsx',
|
||||
'ods',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Weather compression will be applied or not',
|
||||
},
|
||||
{
|
||||
displayName: 'File Name',
|
||||
name: 'fileName',
|
||||
|
@ -342,10 +360,16 @@ export class SpreadsheetFile implements INodeType {
|
|||
wopts.bookType = 'rtf';
|
||||
} else if (fileFormat === 'ods') {
|
||||
wopts.bookType = 'ods';
|
||||
if (options.compression) {
|
||||
wopts.compression = true;
|
||||
}
|
||||
} else if (fileFormat === 'xls') {
|
||||
wopts.bookType = 'xls';
|
||||
} else if (fileFormat === 'xlsx') {
|
||||
wopts.bookType = 'xlsx';
|
||||
if (options.compression) {
|
||||
wopts.compression = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert the data in the correct format
|
||||
|
|
Loading…
Reference in a new issue