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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AutofitRows() on merged cells

Thread ID:

Created:

Updated:

Platform:

Replies:

26974 Apr 4,2005 07:21 PM UTC Apr 5,2005 03:06 PM UTC WinForms 2
loading
Tags: XlsIO
Najati Imam
Asked On April 4, 2005 07:21 PM UTC

Quite simply, it doesn''t seem to work. The cells that result from the following code are, indeed, merged and the text in them is wrapped. However, they are only the default height when the text inside at least 2 lines worth. ... workSheet.Range[rowIndex,3,rowIndex,9].Text = message; workSheet.Range[rowIndex,3,rowIndex,9].Merge(); workSheet.Range[rowIndex,3,rowIndex,9].WrapText = true; workSheet.Range[rowIndex,3,rowIndex,9].AutofitRows(); ...

Administrator [Syncfusion]
Replied On April 4, 2005 07:53 PM UTC

Hi Najati, Could you please explain on what you meant by "However, they are only the default height when the text inside at least 2 lines worth.". I tested for this behavior by Autofitting the row in MS Excel but it does not seems to work on Merged cells. Please let me know if I am missing something. Thanks, Stephen. >Quite simply, it doesn''t seem to work. The cells that result from the following code are, indeed, merged and the text in them is wrapped. However, they are only the default height when the text inside at least 2 lines worth. > >... >workSheet.Range[rowIndex,3,rowIndex,9].Text = message; >workSheet.Range[rowIndex,3,rowIndex,9].Merge(); >workSheet.Range[rowIndex,3,rowIndex,9].WrapText = true; >workSheet.Range[rowIndex,3,rowIndex,9].AutofitRows(); >... >

Najati Imam
Replied On April 5, 2005 03:06 PM UTC

I just meant that when the row should be taller to account for the wrapped text, it was not taller, and instead just the default row height. I hope thats worded a little more clearly, sorry for the confusion. I tried it in Excel on a merged area and it, indeed, seems not to work.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;