Auto size height for rows in Apache POI

后端 未结 10 981
闹比i
闹比i 2020-12-08 18:47

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         


        
10条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 19:35

    Row aitosize work for me:

    cell.getRow().setHeight((short)0);
    

    Here 0 for calculate autoheight.

提交回复
热议问题