-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
The function "(f *File) GetComments() "may renturn empty in some file.
I find my excel file (xl\worksheets_rels\sheet1.xml.rels) is like this. The Target of comments is a abslute path, not a relatively path.
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="comments" Target="/xl/comments/comment2.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"/><Relationship Id="anysvml" Target="/xl/drawings/commentsDrawing2.vml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"/></Relationships>
the implement of GetComments is like this:
f.commentsReader("xl" + strings.TrimPrefix(f.getSheetComments(filepath.Base(path)), ".."))
(see github.com/360EntSecGroup-Skylar/excelize/comment.go:42)