Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
546
WrapText won't adjust row height for WorksheetMergedCellsRegion
posted
Hi,

I'm putting some text in a WorksheetMergedCellsRegion like so and would expect the row to adjust. But it doesn't.
WorksheetMergedCellsRegion region = billingSheet.MergedCellsRegions.Add(cell.RowIndex, 1, cell.RowIndex, 3); region.Value = "- " + invoiceAnnotation.Description; region.CellFormat.Font.Bold = ExcelDefaultableBoolean.True; region.CellFormat.WrapText = ExcelDefaultableBoolean.True; region.CellFormat.RightBorderStyle = CellBorderLineStyle.Medium;

Could you please tell me if I'm doing something wrong. Adjusting row height works for normal (unmerged) cells.

Thanx!
Parents
  • 44743
    posted

    This is just the way Excel works. If you open up Microsoft Excel, merged two cells in the same row, set Wrap Text, and type a string which is too long, the row height will not increase when the value is committed. It will only do this for wrapped values in single cells when the row height has not already been set. 

Reply Children
No Data