Merge branch 'bugfix/tt-table-excel-export' into 'master'

Fix Excel newlines with potential null values in tt-table component.

See merge request fronk/thetool!384
This commit is contained in:
Luca Haid
2024-05-28 09:25:01 +00:00
+1 -1
View File
@@ -453,7 +453,7 @@ Vue.component('tt-table', {
for (const cell in ws) {
if (cell.startsWith('!')) continue; // Skip non-cell properties like '!ref'
const cellValue = ws[cell].v;
if (cellValue.toString().includes('\n')) {
if (cellValue?.toString().includes('\n')) {
// console.log('Found newline in cell:', cell, cellValue);
if (!ws[cell].s) ws[cell].s = {};
ws[cell].s.alignment = {wrapText: true, vertical: 'center'};