summaryrefslogtreecommitdiff
path: root/comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'comment.go')
-rw-r--r--comment.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/comment.go b/comment.go
index 610eae8..e224502 100644
--- a/comment.go
+++ b/comment.go
@@ -50,7 +50,9 @@ func (f *File) GetComments() (comments map[string][]Comment) {
sheetComment.Text += *comment.Text.T
}
for _, text := range comment.Text.R {
- sheetComment.Text += text.T
+ if text.T != nil {
+ sheetComment.Text += text.T.Val
+ }
}
sheetComments = append(sheetComments, sheetComment)
}
@@ -263,7 +265,7 @@ func (f *File) addComment(commentsXML, cell string, formatSet *formatComment) {
RFont: &attrValString{Val: stringPtr(defaultFont)},
Family: &attrValInt{Val: intPtr(2)},
},
- T: a,
+ T: &xlsxT{Val: a},
},
{
RPr: &xlsxRPr{
@@ -274,7 +276,7 @@ func (f *File) addComment(commentsXML, cell string, formatSet *formatComment) {
RFont: &attrValString{Val: stringPtr(defaultFont)},
Family: &attrValInt{Val: intPtr(2)},
},
- T: t,
+ T: &xlsxT{Val: t},
},
},
},