autoFitRows wrong

Workbook ww = new Workbook("C:/Mod.xlsx");
Worksheet worksheet = ww.getWorksheets().get(0);
worksheet.getCells().get("D6").setValue("[1,2,4,9,11,12,25,29,34,45,49,62,72,82,88,91,96,100,110,111,123,144,145,152,153,155,165,166,168,169,171,178,180,189,196,205,206,207,210,212,219,228,242,245,275,291,297,301,306,317,320,321,323,324,343,358,360,362,371,376,395,396,404,411,418,430,431,443,447,450,464,472,473,475,479,493,498,510,526,528,532,533,545,547,550,561,572,577,582,583,586,595,605,613,615,626,632,646,648,664,667,673,675,685,703,713,729,737,739,747,760,774,776,784,785,788,794,800,804,814,819,820,825,828,847,849,859,865,867,881,906,910,915,933,934,944,947,952,960,961,963,968,970,977,983,987,1001,1008,1012,1021,1023,1024,1028,1037,1038,1046,1053,1055,1058,1068,1079,1100,1103,1114,1120,1131,1134,1139,1141,1156]");
AutoFitterOptions options = new AutoFitterOptions();
options.setOnlyAuto(true);
options.setIgnoreHidden(true);
worksheet.autoFitRows(options);
ww.save("C:/x.html");
ww.save("C:/x.pdf");

Hi,


Thanks for your posting and using Aspose.Cells.

We have executed your code and generated the output files and uploaded them. We were not able to identify your issues precisely. Will you please download the output files and let us know with some description or screenshot the issue you are facing. Thanks for your cooperation in this regard and have a good day.

Cell in html is too height and show some space.


Cell in pdf is too small and truncate the string.

Hi,


Thanks for your screenshots and using Aspose.Cells.

We were able to observe these issues and logged them in our database for a fix.

These issues have been logged as

  • CELLSJAVA-42248 - AutoFitRows Problem - Cell in html has more height and shows some space
  • CELLSJAVA-42249 - AutoFitRows Problem - Cell in pdf is too small and truncates the string

Hi,


Thanks for using Aspose.Cells.

For your issue logged as

  • CELLSJAVA-42249 - AutoFitRows Problem - Cell in pdf is too small and truncates the string

If you save Workbook to XLSX format before your save it to PDF format and then open the generated XLSX file (i.e. CELLSJAVA-42249_Java.xlsx) and autofit row 6 manually and then save it to PDF with Microsoft Excel, you will see text in cell D6 is also clipped.

Hi,

Thanks for using Aspose.Cells.

For your issue logged as

  • CELLSJAVA-42248 - AutoFitRows Problem - Cell in html has more height and shows some space

We have exported the same row height and column width with MS-Excel, but the result has some spaces when Browsers render the html. The text layout in td tag is controlled by Browsers. We can't change the rules. So, we are afraid, we will not fix it.

BTW, when you export the file to html via MS-Excel, you will get wrong result too.