[]
DsExcel provides setBestFitColumns and setBestFitRows methods in the IPageSetup interface to properly display long or large-size font texts in cells while printing PDF documents. These methods support SSJSON I/O and are consistent with SpreadJS.
The setBestFitColumns method when set to True, resizes the column width to fit the text with the longest width for printing. Similarly, the setBestFitRows method when set to True, resizes the row height to fit the text with the tallest height for printing.
Refer to the following example code to adjust column width or row height.
// Set bestFitColumns/bestFitRows as true
worksheet.getPageSetup().setBestFitColumns(true);
worksheet.getPageSetup().setBestFitRows(true);