protobi / js-xlsx

XLSX / XLSM / XLSB (Excel 2007+ Spreadsheet) / ODS parser and writer
http://oss.sheetjs.com/js-xlsx
Other
826 stars 416 forks source link

Row height in produced worksheets #25

Open sampov2 opened 8 years ago

sampov2 commented 8 years ago

Is it possible to adjust row heights (per row) in worksheets written using this library?

pietersv commented 8 years ago

I don't believe there is but that seems an important thing to include. Am hesitant to make further extensions until the tests are running in Node 4+ or i invest time to install multiple versions of Node.

If you're game to extend js-xlsx for your immediate purpose, row heights are set by an attribute ht and setting customHeight="1" on the <row> element, e,g,

     <row r="1" spans="1:3" ht="100" customHeight="1">

If the goal is simply generate a new xlsx file, chuanyi/msexcel-builder does have row height, and the protobi/msexcel-builder of it has some extensions for styles, autofilter, etc. just not yet as complete as styles for js-xlsx.

toby-howell commented 7 years ago

Am hesitant to make further extensions until the tests are running in Node 4+

Did https://github.com/SheetJS/js-xlsx/commit/2a756fffccc30bf6871d7f04ede61a6fef160555 get those tests passing?

codecounselor commented 7 years ago

I was going to offer up a PR but I've got some other changes that are causing conflicts. If anyone is interested you can cherry-pick this commit or just copy the changes wholesale into your fork. https://github.com/SpiderStrategies/js-xlsx/commit/0d1f7a080f1a9848a2ef9f9f7cd50d149ff2eb55