summaryrefslogtreecommitdiff
path: root/comment.go
diff options
context:
space:
mode:
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"