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

f.formattedValue runtime error: invalid memory address or nil pointer dereference #529

Closed
wubin1989 opened this issue Dec 9, 2019 · 3 comments
Labels
confirmed This issue can be reproduced

Comments

@wubin1989
Copy link

Description

Steps to reproduce the issue:

  1. xlsx, err = excelize.OpenReader(resp.Body)
  2. sheetName := xlsx.GetSheetName(xlsx.GetActiveSheetIndex())
  3. rows, err = xlsx.GetRows(sheetName)

Describe the results you received:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb2c055]
goroutine 82
[running]:
github.com/360EntSecGroup-Skylar/excelize/v2.(*xlsxC).getValueFrom(0xc0103d1348, 0xc0000ffb00, 0xc0002b80a0, 0x1, 0x0, 0x0, 0xc0103d1310)
/data/wubin/gopath/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize/v2@v2.0.2/rows.go:214 +0xe5
github.com/360EntSecGroup-Skylar/excelize/v2.(*Rows).Columns(0xc03612e000, 0x0, 0x40, 0xc00013c000, 0x0, 0x0)
/data/wubin/gopath/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize/v2@v2.0.2/rows.go:80 +0x1c9
github.com/360EntSecGroup-Skylar/excelize/v2.(*File).GetRows(0xc0000ffb00, 0xc000392360, 0x6, 0x1, 0x1, 0x14, 0x0, 0x0)
/data/wubin/gopath/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize/v2@v2.0.2/rows.go:41 +0xe4
Describe the results you expected:
no panic and get rows
Output of go version:

go version go1.12.6 linux/amd64

Excelize version or commit ID:

v2.0.2

Environment details (OS, Microsoft Excel™ version, physical, etc.):

@wubin1989
Copy link
Author

442.xlsx
This is test file.
Help!

@xuri xuri added the confirmed This issue can be reproduced label Dec 9, 2019
@xuri xuri closed this as completed in 5d8365c Dec 10, 2019
@xuri
Copy link
Member

xuri commented Dec 10, 2019

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

@wubin1989
Copy link
Author

@xuri Many thanks!

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