3

I am trying to compute the height of the row I'm inserting into my excel sheet. The row's cells are formatted with WrapText=true, so the height of the row is not fixed. Accessing row.Height will return null.

I was thinking of using something similar to Graphics.MeasureString where I also specify the width constraint in order to retrieve the height.

Didn't find any relevant info online. Any help would be appreciated.

Karim
  • 247
  • 4
  • 11
  • `Row.Height` works for me... Either way, if you select any cell in the row and use `Activecell.Height`, doesn't it return the height for you?? – John Bustos Aug 12 '14 at 16:26
  • `Row.Height` doesn't seem to work on rows that has cells with "warp text". On the other hand, `ActiveCell` is of type `StringValue` and doesn't have a `Height` property.. – Karim Aug 12 '14 at 17:22

1 Answers1

0

See my post here using Graphics.MeasureString. It works very well.

Autofit Row Height of Merged Cell in EPPlus

Community
  • 1
  • 1
Ben Gripka
  • 16,012
  • 6
  • 45
  • 41