Cell.getHeightOfValue() returns different values in Excel worksheet in Java

Hi,

Using Aspose Java 8.6.2 cell.getHeightOfValue() returns different values on my local environment (which is Windows) and Server side (which is linux). Both have same value on cell written, but Server always returns a lower number than local environment.

here is the code:

final Cell cell = getsCell…
cell.setHtmlString(text);
cell.getHeightOfValue();

There is no difference between those environments in terms of writing spreadsheet.

Can you please help? im using it to merge necessary rows to display entire HTML text.

Thanks,

@manfredrunkel,

Thanks for your query.

I have tried to reproduce this issue using following sample code but no difference is observed in Windows and Mac environment at my end using latest version Aspose.Cells for Java 18.9.x. Could you please test the issue using latest version and provide your feedback?

Workbook wb = new Workbook();
Cell cell = wb.getWorksheets().get(0).getCells().get("A1");
cell.setHtmlString("<html><body><h1>This is a Heading</h1></body></html>");
System.out.println("Height of value = " + cell.getHeightOfValue());

Thanks for reply. Please try with more characters until it reaches 546px.

Need to know which is the total size to merge more than one cell.

Thanks

By writing only one letter, it returns 14 for linux and 16 on windows with same code.

@manfredrunkel,

Please send us the sample console application (runnable) and template file (if any) for our testing. We have tried to re-produce it but could not succeed.

Similarly send us the sample console application for this issue as well.

Please note that you need to install the font in Linux system, which is used in the Excel files used for testing at your end. If respective font is not installed, you may get different results.