Skip to content

GetComments failed in some file #825

@raochq

Description

@raochq

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThis issue can be reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions