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

AutofitRow

I have used the AutofitRow method to fit a row to the text. Is it possible to get the row height of that has been "autofitted"? eg. sht["A1"].Value2 = "Long text" sht["A1"].WrapText = true; sht.AutofitRow(1); double rowHeight = sht.Rows[0].RowHeight; The above code does not return the new value of the row height but the previous value; Any help would be much appreciated.

3 Replies

AD Administrator Syncfusion Team September 2, 2004 03:36 AM UTC

Hi Simon, Thank you for your interest in Syncfusion Essential ExcelRW. This issue has been identified as a bug and will be fixed as soon as possible. I will update this thread with more information when this issue gets fixed. Thank you for your patience. Best regards, Stephen. >I have used the AutofitRow method to fit a row to the text. Is it possible to get the row height of that has been "autofitted"? eg. > >sht["A1"].Value2 = "Long text" >sht["A1"].WrapText = true; >sht.AutofitRow(1); >double rowHeight = sht.Rows[0].RowHeight; > >The above code does not return the new value of the row height but the previous value; > >Any help would be much appreciated.


AI Amal Ibrahim April 10, 2008 12:59 PM UTC

Hi,
I have the same issue. Did you have a fix for this issue?




YG Yavanaarasi G Syncfusion Team April 11, 2008 12:41 PM UTC

Hi Amal,

Thank you for your interest in Syncfusion products.

I regret to let you that currently we do not have support to obtain the new height of the Row when WrapText property is set to true for a cell using XlsIO. We have logged feature request regarding this. We will get back to you once the feature is implemented.

An option to obtain the row height with wrap text but the actual row height is not set by xlsIO. This would mean that excel calculates the row height and we have a helper method that returns the approx height.

Here is the sample for your reference:

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

It will not return accurate height, but it will return only the approximate height.

Please let me know if you have any questions.

Regards,
G.Yavana



Loader.
Live Chat Icon For mobile
Up arrow icon