-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
DeleteComment is no deletion marker #1789
Comments
Thanks for your issue. Could you show us a complete, standalone example program or reproducible demo? I have tested with the following code and it works well. package main
import (
"fmt"
"github.com/xuri/excelize/v2"
)
func main() {
f := excelize.NewFile()
defer func() {
if err := f.Close(); err != nil {
fmt.Println(err)
}
}()
if err := f.SetCellValue("Sheet1", "A2", 100); err != nil {
fmt.Println(err)
return
}
if err := f.AddComment("Sheet1", excelize.Comment{Cell: "A2", Text: "aaa"}); err != nil {
fmt.Println(err)
return
}
if err := f.DeleteComment("Sheet1", "A2"); err != nil {
fmt.Println(err)
return
}
if err := f.SaveAs("Book1.xlsx"); err != nil {
fmt.Println(err)
}
} |
I used your code and it's still the same as I described. |
Thanks for your feedback. This issue has been fixed, please try to upgrade the master branch code, and this patch will be released in the next version. |
After I deleted the comment, there was still the comment.
As you can see the code:
go version: go1.21.3 windows/amd64
excelize version: 2.8.0
The text was updated successfully, but these errors were encountered: