Get height of row where the cells have WrapText set

≯℡__Kan透↙ 提交于 2019-12-24 03:53:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!