Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing text value of comments #434

Closed
gitarte opened this issue Jul 9, 2019 · 1 comment
Closed

Missing text value of comments #434

gitarte opened this issue Jul 9, 2019 · 1 comment
Labels
confirmed This issue can be reproduced

Comments

@gitarte
Copy link

gitarte commented Jul 9, 2019

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

xuri added a commit that referenced this issue Jul 14, 2019
Add a missing element of the comment text elements
@xuri xuri added confirmed This issue can be reproduced in progress Working in progress labels Jul 14, 2019
@xuri xuri closed this as completed in 74c6112 Jul 15, 2019
@xuri xuri removed the in progress Working in progress label Jul 15, 2019
@xuri
Copy link
Member

xuri commented Jul 15, 2019

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

nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
Add a missing element of the comment text elements
nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants