ClosedXML.Report icon indicating copy to clipboard operation
ClosedXML.Report copied to clipboard

Is there an example for the option <<RowsFit>>

Open Hoschi1982 opened this issue 3 years ago • 3 comments

Hy there,

the option <<RowsFit>> does not work for me. Is there any example so I can see how and where I have to specify it?

thanks a lot

Hoschi1982 avatar Oct 19 '21 21:10 Hoschi1982

I have a problem with this tag too. I using nested ranges with horizontal tables in my template. image

If I use RowsFit tag in any avalable cell, I get this result: image Dark-orange rows are not fitted.

If I use template without RowsFit tag, I get strangely formatted result: image

Can someone explain how this tag works, please?

vladislav-bah avatar Oct 20 '21 08:10 vladislav-bah

In accordance with the way AdjustToContents works in ClosedXML, I can say that the <<RowsFit>> tag automatically calculates the height for cells that have Rich text, or the text is rotated with the TextRotation style, or the text contains NewLine characters. In other cases, to automatically calculate the height of a cell, it is enough to set the style with text wrapping on the required cells in the template.

image

b0bi79 avatar Nov 07 '21 12:11 b0bi79

@vladislav-bah I will try to fix this issue in horizontal ranges. Thanks.

b0bi79 avatar Nov 07 '21 12:11 b0bi79