How To Set Excel Default Row Height in Apache POI
问题 I'm using Apache POI 3.7 with Spring MVC 3.1. How to set excel default row height in apache POI? I've tried sheet.setDefaultRowHeight((short) 100) and sheet.setDefaultRowHeightInPoints(100) but that doesn't work. Any suggestion for this problem? Thank you. 回答1: I use row.setHeightInPoints((2 * sheet.getDefaultRowHeightInPoints())); to set it (for example) to 2 characters high. 回答2: Create a style with the desired height and apply it to the cells you want to appear that way. Documentation can