mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ added compression option
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user