We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Cells conversion. Cells height

Hello,

I convert Excel to HTML using Aspose.Cells.
I have a question related to Row height.
I use the next code before saving to adjust row height in accordance to content:

using Workbook wb = new Workbook(inputStream);
foreach(var s in wb.Worksheets)
{
s.AutoFitRows();
}

As a result, I end up with an HTML file where the height given for the line does not match the actual one.
image.png (23.6 KB)
Excel file example: example.zip (463.7 KB)

Is it possible to get the real line height?

@Andrei86,

Aspose.Cells follows MS Excel standards (or specifications) when applying auto-fit rows or columns operations. Please open the file in MS Excel manually and perform auto-fit row operation for your desired rows (one by one), you will get same display as of Aspose.Cells. Actually, certain cells in those particular rows have long list of data, so to accommodate it, it has to extend maximum height(s). This results in cells with minimum data are still extended unnecessarily. But, this is how auto fit operation works and all about, it sets extensive row height for all the cells in that row.

Thanks for explanation.
But I thought that row height should be equal to the height of the largest cell.
But in HTML I see height 546 for the row.
Am I correct that this is the highest height set by Excel for the row, even if the content is much longer and requires a higher height to be set?

@Andrei86,

Yes, MS Excel can only extend height upto 409.50 points (546 pixels) only for a row. See the MS Excel specifications and limits for your reference.

Thanks for assist.

@Andrei86,

You are welcome.