diff --git a/src/main/resources/react4xp/table/Table.tsx b/src/main/resources/react4xp/table/Table.tsx index b61996d5d..1b75a54f4 100644 --- a/src/main/resources/react4xp/table/Table.tsx +++ b/src/main/resources/react4xp/table/Table.tsx @@ -91,7 +91,7 @@ function Table(props: TableProps) { } function downloadTableAsExcel() { - if (window.downloadTableFile) { + if (window.downloadTableFile && !useNewTableExport) { window.downloadTableFile(tableWrapperRef.current, { type: 'xlsx', fileName: 'tabell', @@ -107,7 +107,7 @@ function Table(props: TableProps) { }, }) } - if (useNewTableExport && tableRef?.current) { + if (tableRef?.current && useNewTableExport) { exportTableToExcel({ tableElement: tableRef.current, fileName: displayName }) } }