Closed
Description
Hello there,
In my application I'm building an Excel document row by row and stream each row when it's done. One cell has rich formatting - some words have specific colours. I think I'm doing the right thing but in the Excel document the cell has the value [Object object]
.
I guess this is the toString()
of the object instead of the correct rendering.
Here is a little example that is failing for me:
var fs = require('fs');
var exceljs = require('exceljs');
var stream = fs.createWriteStream('richtTextStream.xlsx');
var wb = new exceljs.stream.xlsx.WorkbookWriter({'stream': stream, 'useStyles': true});
var ws = wb.addWorksheet('rich');
var row = ws.getRow(2);
var cell = row.getCell(2);
cell.value = {
richText: [
{
font: {color: {argb: '99E391'}},
text: 'This part '
},
{
font: {color: {argb: 'FF6565'}},
text: ' and that one.'
}
]
};
row.commit();
ws.commit();
wb.commit();
If I use a non streaming workbook and write the file using wb.xlsx.writeFile()
then I can see the correct formatting.
Any idea what is going on? Is there some missing rendering logic in the Streaming I/O?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels