HI Team,
I have tried the below to increase the column width as per data.Still i am unable to do it .Please suggest.Please refer attahced Excel file which is getting generated.Name column width is not set properly.we would like to apply the wrap after set column width.
code 1:
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
//============== Setting Row Height ==============
//Setting the height of the second row to 40
cells.setRowHeight(1, 40);
//Setting the height of all rows in the worksheet to 15
[//worksheet.getCells ](https://worksheet.getcells/)().setStandardHeight(15f);
//============== Setting Column Width ============
//Setting the width of the second column to 17.5
cells.setColumnWidth(1, 50);
Code 2:
worksheet.autoFitColumns();
Please provide any sample code if you have any.