Skip to content
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

AutoFitColumns appears to miscalculate #884

Open
Paul3816547290 opened this issue May 19, 2023 · 1 comment
Open

AutoFitColumns appears to miscalculate #884

Paul3816547290 opened this issue May 19, 2023 · 1 comment
Assignees

Comments

@Paul3816547290
Copy link

After using autofit on a whole worksheet (i.e. worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns();)

And then opening in Excel I notice the following.

  1. Any cell with multilines is miscalculated - I had some lines with Rich Text lines "This is some text\r\nThis is some more text\r\n" and this would horizontally wrap too short (like it was word wrapping the lines, not wrapping on line breaks - like excel would)
  2. Excel autofit will enlarge all cells about 1 pixel. And would resize those miscalculated above
@JanKallman
Copy link
Contributor

EPPlus currently ignore cells with the WrapText style property set. The autofit columns property is not exact, but you can play with the settings for it if needed. Have a look at this wiki page

@swmal swmal self-assigned this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants