single file options in excel export

This commit is contained in:
Jan Prochazka
2020-11-19 12:07:30 +01:00
parent 7ccb1d9c90
commit 03451c6897
3 changed files with 39 additions and 2 deletions

View File

@@ -21,6 +21,32 @@ const excelFormat: FileFormatDefinition = {
};
}
},
args: [
{
type: 'checkbox',
name: 'singleFile',
label: 'Create single file',
direction: 'target',
},
],
getDefaultOutputName: (sourceName, values) => {
if (values.target_excel_singleFile) {
return sourceName;
}
return null;
},
getOutputParams: (sourceName, values) => {
if (values.target_excel_singleFile) {
return {
sheetName: values[`targetName_${sourceName}`] || sourceName,
fileName:'data.xlsx'
};
}
return null;
},
};
export default excelFormat;