英文:
How to change comments in excel file with go
问题
我正在使用excelize库。
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}]]
我的评论comment1
的坐标没有改变。如何解决这个问题?
英文:
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
得分: 1
评论绑定到单元格。当你插入新行时,上面的单元格仍然包含评论。
如果你想在第二行添加评论,你需要明确设置评论。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论