Minggu, 17 Maret 2019

How do I format cells in workbook produced by xlsx package under Angular

NB. While primarily looking for an answer relating to the xlsx package (as it seems to be vastly suggested and discussed), I fear that it might be impossible. So, I'm also open to going in another direction (as long as it's free and works for Angular/Excel).

I've found xlxs and I'm producing Excel formatted files. I'd like to control a bit of the style so I added the property s to a cell as suggested in the comments (code sample here).


testMagic() {
const table = document.getElementById("donkey");
const workBook = XLSX.utils.table_to_book(table);
workBook.Sheets.Sheet1.A1.s = { font: { bold: true } };
XLSX.writeFile(workBook, "wonkey.xlsx");
}

I see no difference in the downloaded file, though. I've googled the issue but the combo Angular and xlsx and styling isn't commonly blogged.

I'm hoping it's something rather easy to resolve that I'm missing due to confusion and ignorance.



from How do I format cells in workbook produced by xlsx package under Angular

How do I format cells in workbook produced by xlsx package under Angular Rating: 4.5 Diposkan Oleh: Admin

0 komentar:

Posting Komentar

Popular Posts