Skip to content

GetRows() panics #411

@dictor66

Description

@dictor66

I got panic when processing an Excel file at the following command:
rows, _ := xlsx.GetRows(sheetName)
The same file was processed successfully before the updating of the package.
Previous version hash I used: eca6618

Steps to reproduce the issue:

  1. Try to process a simple Excel file with no fromatting

Describe the results you received:

panic error

Describe the results you expected:

No error

Output of go version:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x873876]

goroutine 1 [running]:
github.com/xuri/excelize.(*File).formattedValue(0xc0001ca8c0, 0x1b, 0x0, 0x0, 0x4, 0xc0004a40c0)
/go/src/github.com/xuri/excelize/cell.go:561 +0x46
github.com/xuri/excelize.(*xlsxC).getValueFrom(0xc0001334c8, 0xc0001ca8c0, 0xc000151770, 0x1, 0x0, 0x0, 0x0)
/go/src/github.com/xuri/excelize/rows.go:322 +0x1c9
github.com/xuri/excelize.(*File).GetRows(0xc0001ca8c0, 0xc000258220, 0xb, 0xe4a652, 0x1, 0xc000027740, 0x29, 0x0)

Excelize version or commit ID:
6233757

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

Windows 7
go version go1.12.4 windows/amd64

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