How to change comments in excel file with go

158 views Asked by At

I'm using the excelize library.

newfile, _ := excelize.OpenFile("filename.xlsx")

println(newfile.GetComments())
//map[Sheet1:[{Author 0 A2 comment1}]]

_ = newfile.InsertRow("Sheet1", 1)

println(newfile.GetComments())
//map[Sheet1:[{Author 0 A2 comment1}]]

the coordinates of my comment comment1 have not changed. How to solve this problem?

1

There are 1 answers

0
MAHA On

The comment is bound to a cell. When you insert a new row, the call above still contains the comment. If you would like a comment in the second row, you have to set the comment explizit.