I am inputting values into a spreadsheet using Apache POI. These values have newlines, and I was able to use this code successfully:
CellStyle style = cell.g
Row aitosize work for me:
cell.getRow().setHeight((short)0);
Here 0 for calculate autoheight.
0