-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement AutoSizeRow method #907
Implement AutoSizeRow method #907
Conversation
Added to prepare for auto height for rows implementation
…of SheetUtil. Also added method to check row height in specific span of columns.
…dd reloads with actual IRow for GetRowHeight.
Got rid of default character height, it as needed by width getter, because excel limits width of the column by number of characters, and height isn't tied to it. Fixed how row span is counted, it was wrong. Added ratio to final height so it is close to how excel would count it.
Implemented in ISheet interface and in XSSFSheet class. HSSFSheet and SXSSFSheet implement interface through stubs for now.
…p in row height mesurments.
SixLabors.ImageSharp mesures strings differently, thus new control value.
Since this is a new feature and there is no impact on existing features, I'll merge it first and see if there is some feedback from users. Thank you for your contribution. I really appreicate it. |
The pleasure is mine, thanks for taking time to take a look at it. |
I am facing this issue System. Sequence contains no elements |
Linux/docker? |
Usually this happens to me on docker images with no fonts installed. The AutoSizeColumn method is measuring the string in the cell using it's font but for this it need information on the font. And in many Linux images there are no font installed which creates this error you are facing. Even if this is not a Linux - just try to install any font and try again. |
There was AutoSizeColumn method, that adjusts width of the column to fit it's contents, but no such method to adjust the height of the row. This change implements such a method in a very similar to AutoSizeColumn way. It also adds a tests for new methods.