问题
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.
回答1:
See my post here using Graphics.MeasureString. It works very well.
Autofit Row Height of Merged Cell in EPPlus
来源:https://stackoverflow.com/questions/25268234/get-height-of-row-where-the-cells-have-wraptext-set