on-internet
← Community

excel4node lib to autosize excel cell in order to fit longer text

Stack Overflow ·

Using excel4node lib in order to generate excel docs out of some web tables, is there a possibility to autosize cell when the text is too long to fit it in one cell and to make the width of the cell bigger? In documentation they have this 2 functions: ws.column(3).setWidth(50); ws.row(1).setHeight(20); But that won't fit the text inside, will just make the cell bigger. Will show example: and my desired output: Code for that comment cell: reducedReport.forEach((element, index) => { ws.cell(index + 2, 1).string(element["projectName"]); ws.cell(index + 2, 2).string(element["workerName"]); ws.cell

Comments

Sign in or sign up to comment and upvote.

No comments yet.