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

RemoveCellComment method seems doesn't work in my excel workbook #1000

Closed
a0y1a opened this issue Jan 21, 2023 · 2 comments
Closed

RemoveCellComment method seems doesn't work in my excel workbook #1000

a0y1a opened this issue Jan 21, 2023 · 2 comments
Labels
Milestone

Comments

@a0y1a
Copy link

a0y1a commented Jan 21, 2023

image
Above is my excel screenshot with comments, there is only one cell. I use RemoveCellComment method to clear cell comment.
Then I validated cell value, found it is not a phone number, so I add a new comment on the cell, below is my code:
item.Cell.CellComment = drawing.CreateCellComment(new XSSFClientAnchor(0, 0, 0, 0, column + 2, row, column + 3, row + 3));
item.Cell.CellComment.String = new XSSFRichTextString(item.ErrorText);

I saved workbook to excel and opened it, found the comment displayed effect is same as the first picture.
I opened excel and remove cell comment manually, and repeated the above steps,the comment displayed normal as below:
image
I don't know what's wrong. Is there a problem with my usage? Below is my excel.
b.xlsx

@tonyqus tonyqus added this to the NPOI 2.7.1 milestone Jun 23, 2023
@Bykiev
Copy link
Collaborator

Bykiev commented Jul 28, 2023

Hi, I've tried to reproduce the issue with master branch and all is working as expected. Which version of NPOI are you using?

Are you using SXSSFWorkbook? It's a bug in POI and RemoveCellComment doesn't actually remove it

@Bykiev
Copy link
Collaborator

Bykiev commented Apr 8, 2024

@a0y1a, the issue with cell comments in SXSSF was fixed in #1136
Can you please confirm if your issue is resolved?

@tonyqus tonyqus modified the milestones: NPOI 2.7.1, NPOI 2.6.2 May 3, 2024
@tonyqus tonyqus closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants