small improvements

This commit is contained in:
ricardo 2020-03-17 14:39:20 -04:00
parent ba2d411d33
commit 79ba4dd43d
3 changed files with 69 additions and 0 deletions

View file

@ -206,6 +206,9 @@ export class MicrosoftExcel implements INodeType {
if (!rawData) {
//@ts-ignore
responseData = responseData.map(column => ({ name: column.name }));
} else {
const dataProperty = this.getNodeParameter('dataProperty', i) as string;
responseData = { [dataProperty] : responseData };
}
}
}
@ -242,6 +245,9 @@ export class MicrosoftExcel implements INodeType {
result.push({ ...object });
}
responseData = result;
} else {
const dataProperty = this.getNodeParameter('dataProperty', i) as string;
responseData = { [dataProperty] : responseData };
}
}
}
@ -321,6 +327,9 @@ export class MicrosoftExcel implements INodeType {
result.push({ ...object });
}
responseData = result;
} else {
const dataProperty = this.getNodeParameter('dataProperty', i) as string;
responseData = { [dataProperty] : responseData };
}
}
}

View file

@ -260,6 +260,26 @@ export const tableFields = [
default: false,
description: 'If the data should be returned RAW instead of parsed into keys according to their header.',
},
{
displayName: 'Data Property',
name: 'dataProperty',
type: 'string',
default: 'data',
displayOptions: {
show: {
operation: [
'getRows'
],
resource: [
'table',
],
rawData: [
true,
],
},
},
description: 'The name of the property into which to write the RAW data.',
},
{
displayName: 'Filters',
name: 'filters',
@ -415,6 +435,26 @@ export const tableFields = [
default: false,
description: 'If the data should be returned RAW instead of parsed into keys according to their header.',
},
{
displayName: 'Data Property',
name: 'dataProperty',
type: 'string',
default: 'data',
displayOptions: {
show: {
operation: [
'getColumns'
],
resource: [
'table',
],
rawData: [
true,
],
},
},
description: 'The name of the property into which to write the RAW data.',
},
{
displayName: 'Filters',
name: 'filters',

View file

@ -201,6 +201,26 @@ export const worksheetFields = [
default: false,
description: 'If the data should be returned RAW instead of parsed into keys according to their header.',
},
{
displayName: 'Data Property',
name: 'dataProperty',
type: 'string',
default: 'data',
displayOptions: {
show: {
operation: [
'getContent'
],
resource: [
'worksheet',
],
rawData: [
true,
],
},
},
description: 'The name of the property into which to write the RAW data.',
},
{
displayName: 'Data Start Row',
name: 'dataStartRow',