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:
@@ -453,7 +453,7 @@ Vue.component('tt-table', {
|
|||||||
for (const cell in ws) {
|
for (const cell in ws) {
|
||||||
if (cell.startsWith('!')) continue; // Skip non-cell properties like '!ref'
|
if (cell.startsWith('!')) continue; // Skip non-cell properties like '!ref'
|
||||||
const cellValue = ws[cell].v;
|
const cellValue = ws[cell].v;
|
||||||
if (cellValue.toString().includes('\n')) {
|
if (cellValue?.toString().includes('\n')) {
|
||||||
// console.log('Found newline in cell:', cell, cellValue);
|
// console.log('Found newline in cell:', cell, cellValue);
|
||||||
if (!ws[cell].s) ws[cell].s = {};
|
if (!ws[cell].s) ws[cell].s = {};
|
||||||
ws[cell].s.alignment = {wrapText: true, vertical: 'center'};
|
ws[cell].s.alignment = {wrapText: true, vertical: 'center'};
|
||||||
|
|||||||
Reference in New Issue
Block a user