Fix Excel newlines with potential null values in tt-table component.
This commit is contained in:
@@ -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'};
|
||||
|
||||
Reference in New Issue
Block a user