| '); // corner cell for (let c = 0; c < colCount; c++) { parts.push(` | ${colLetter(c + range.s.c)} | `); } parts.push('
|---|---|
| ${r + range.s.r + 1} | `); for (let c = 0; c < colCount; c++) { const address = XLSX.utils.encode_cell({ r: r + range.s.r, c: c + range.s.c }); const val = c < row.length ? row[c] : ''; const hasComment = !!worksheet[address]?.c?.length; const isNum = typeof val === 'number'; parts.push( `${esc(val)}${hasComment ? '' : ''} | ` ); } parts.push('