Skip to content

Missing text value of comments #434

@gitarte

Description

@gitarte

Description
Method GetComments() does not return text value of the comments. It returns only addresses of the cells that have comments

Steps to reproduce the issue:

// load spreadsheet from file
wb, err := excelize.OpenFile(filePath)
if err != nil {
    return result, errors.Wrapf(err, "cannot open spreadsheet %s", filePath)
}

// just printf available comments
fmt.Printf("%+v \n", wb.GetComments())

Example results:

map[
    Sheet1:[
        {Author: AuthorID:0 Ref:I3 Text:} 
        {Author: AuthorID:0 Ref:K3 Text:} 
        {Author: AuthorID:0 Ref:M3 Text:} 
    ]
]

Example of results I expected:

map[
    Sheet1:[
        {Author: AuthorID:0 Ref:I3 Text: some comment text 1} 
        {Author: AuthorID:0 Ref:K3 Text: some comment text 2} 
        {Author: AuthorID:0 Ref:M3 Text: some comment text 3} 
    ]
]

Output of go version:

go version go1.12 darwin/amd64

Excelize version or commit ID:
Behaves the same in

"github.com/360EntSecGroup-Skylar/excelize"

as in

"github.com/360EntSecGroup-Skylar/excelize/v2"

Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OSX
issue-example.xlsx

Activity

added a commit that references this issue on Jul 14, 2019
xuri

xuri commented on Jul 15, 2019

@xuri
Member

Hi @gitarte, thanks for your issue. I have fixed it. Please try to upgrade the library with the master branch code.

added 2 commits that reference this issue on Oct 23, 2020
added a commit that references this issue on Mar 14, 2024
74c6112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @xuri@gitarte

        Issue actions

          Missing text value of comments · Issue #434 · qax-os/excelize