summaryrefslogtreecommitdiff
path: root/comment.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2019-04-15 11:22:57 +0800
committerxuri <xuri.me@gmail.com>2019-04-15 11:22:57 +0800
commitf2df344739146189a1dea7cfb81239231af5135b (patch)
treed0a119d2c2d3e25a6b3d298088f233db1bb39648 /comment.go
parentc423617e9d948b61cf9397710bf8f2098efe7634 (diff)
Resolve #369,#370
add error return value exported functions: GetMergeCells ProtectSheet UnprotectSheet UpdateLinkedValue GetMergeCells SetSheetVisible inner functions: workSheetReader copySheet
Diffstat (limited to 'comment.go')
-rw-r--r--comment.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/comment.go b/comment.go
index ca79779..ed3d4a7 100644
--- a/comment.go
+++ b/comment.go
@@ -80,7 +80,10 @@ func (f *File) AddComment(sheet, cell, format string) error {
return err
}
// Read sheet data.
- xlsx := f.workSheetReader(sheet)
+ xlsx, err := f.workSheetReader(sheet)
+ if err != nil {
+ return err
+ }
commentID := f.countComments() + 1
drawingVML := "xl/drawings/vmlDrawing" + strconv.Itoa(commentID) + ".vml"
sheetRelationshipsComments := "../comments" + strconv.Itoa(commentID) + ".xml"