Define the row height AutofitRow (AutoPageBreaks)

I am using Flexcel.dll for .Net VB
I have a problem with define the row height after using AutofitRow.
How can I define the row height after using AutofitRow?

AutofitRow(row , row, False, True, 1) GetRowHeight

expression returns the default row height, as though AutofitRow have not called.
I need that to calculate and insert a pagebreaks for a print.
When I used KeepRowsTogether and  AutoPageBreaks() it does not work correctly (may be its happened because of AutofitRow  procedure invoke for all rows,  pagebreaks take wrong place)
After KeepRowsTogether and AutoPageBreaks()  procedures call I have following pictures:



Thank you for your support


Can you send me the xls you are creating and the exact Autofit/autoheight commands that you are using?

It is a little hard to diagnose with just this data, but some ideas:

1) You need to call first autorowheight and then autofit, so when you autofit all rows are on the new size.
2) Make sure you install the latest FlexCel, I think we fixed an issue on AutoPageBreaks on it, but I can't remember exactly.
3) Autofititng in Excel and FlexCel can be different, because Excle uses GDI and we use GDI+ and those frameworks report slightly different sizes for the characters in a font. (normally GDI+ reports smaller sizes, so it can "fit" more in a row)
So it would be interesting to know, if you export this file to pdf, does it still look wrong or the page sizes are correct there?
If the page sizes are correct in the pdf, you might have to give a bigger adjustment (last parameter) in autofitrow, and also maybe in the pagescale of AutoPageBreaks.
Adrian Gallero2012-06-18 08:16:10

By the way, I pushed the wrong button and made an empty reply. So I edited it. If you got the notification for the empty reply, please look at the forum again.