We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

problem with reading RowHeight

Hello,

I use Syncfusion 6.2.0.40. When I try to read sheet.Range[row, col].RowHeight, it shows incorrect values if WrapText = true caused the row become bigger in size (cell content in more than one line).

The goal is to set the row height to some value (different from default) only in case when its size is not changed by long text in the cell. Changing the size before the line with "WrapText = true" makes the line not working (which is strange).

Does anybody has any idea ? Well, of course I could have changed the row size only when the text is not longer than... But I guess there should be any method of checking the real row size...

Tomek


1 Reply

GM Geetha M Syncfusion Team November 24, 2008 07:39 AM UTC

Hi Tomasz,

Thank you for the details.

As you said, if WrapText is set to true, the row height does not return the correct height or it returns the previous height. Essential XlsIO does not have the option to re-calculate the RowHeight up on toggling WrapText. We have logged a feature request for this and will update you once it is available.

Meanwhile, you could calculate the approximate height of the cell using our helpher class that then set it as the row height. Please refer to the sample demonstrating this in the below link:

http://websamples.syncfusion.com/samples/XlsIO.Windows/F77968/main.htm

But this will return the approximate height and it will not be absolute.

Please let me know if you have any questions.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon