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

Comment SetAutomaticSize does not size the comment's background #2324

Open
2 of 5 tasks
BenPH opened this issue Apr 11, 2024 · 0 comments
Open
2 of 5 tasks

Comment SetAutomaticSize does not size the comment's background #2324

BenPH opened this issue Apr 11, 2024 · 0 comments

Comments

@BenPH
Copy link

BenPH commented Apr 11, 2024

Do you want to request a feature or report a bug?

  • Bug
  • Feature
  • Question

Did you test against the latest CI build?

  • Yes
  • No

Version of ClosedXML

0.102.2

What is the current behavior?

comment.Style.Size.SetAutomaticSize(); does not size the comment background to fit its text.

Screenshot 2024-04-11 at 12 50 34 PM

Excel version:
Microsoft® Excel for Mac
Version 16.83 (24031120)

What is the expected behavior or new feature?

Comment size resizes

Reproducibility

var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("CommentSize");

var comment = ws.Cell("A1").CreateComment();
comment.AddText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
comment.Style.Size.SetAutomaticSize();

wb.SaveAs("CommentsSize.xlsx");

Produces this file

CommentsSize.xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant