Aspose cells version 8.0.0
I found the problem, I can’t calculate height of rows with cells with long texts.
See example and attachment 1404134057124.xlsx.
public static void main(String[] args) throws Exception {
Workbook workbook = new Workbook( );
Cells cells = workbook.getWorksheets().get(0).getCells();
for (int i=1; i<10; i++) {
Cell cell = cells.get( “A” + i );
Style style = cell.getStyle();
style.setTextWrapped( true );
cell.setStyle( style );
cell.setValue( randomString( 5 * i ) );
cells.get(“B” + i).setValue( cells.getRowHeight( i - 1 ) );
}
String fileName = “C:\temp\” + System.currentTimeMillis() + “.xlsx”;
workbook.save( fileName );
System.out.println( fileName + " is created" );
}
public static String randomString( int len ) {
StringBuilder result = new StringBuilder();
for (int i = 0; i < len; ++i) {
char ch = (char) (‘a’ + (char) (Math.random() * 26));
result.append(ch);
}
return result.toString();
}