js-xlsx
js-xlsx copied to clipboard
Add row height (SheetJS/js-xlsx/issues/856)
I needed row heights; changes pulled straight from SheetJS/js-xlsx master 0.11.10
hey bro, i find that 'xlsx-style' dont work ws['!rows'], i really added it, but it really did not works , how can i solve it, thanls
linYeeTracy, I did something like:
var dataRows = [];
// populate dataRows Array with styled rows (borders, colors, etc.)...
var workbook = new Workbook().addRowsToSheet("Sheet1", dataRows);
// set workbook colwidths, merge cells etc...
var worksheet = workbook.getSheet("Sheet1");
worksheet['!rows'] = [];
// let's set row heights
for (i = 0; i < dataRows.length + 10; i++) {
worksheet['!rows'].push({
hpt: 16,
});
}
workbook.finalize();
@soldemuth not working, you can show full example ?
@soldemuth working. I have set
ws["!rows"] = [....]
Thanks for fix.
@tinamore that's great!
@soldemuth I have modified xlsx.js according to your commit but ws['!rows'] still doesn't work. can you help me , master...
@tinamore not working, you can show full example ?
@phostann Have you solved this problem?
@phostann @nextdooroldwang Use this js file. it is working: https://github.com/soldemuth/js-xlsx/blob/master/dist/xlsx.full.min.js
sheet['!rows'] = [{...}]; Can you change the font weight of Excel