panic occurs when the getCellType method is called in the cellType, err := fileXlsx.GetCellType(sheet, axis.getAxis())
Expected behaviour
there should obviously be no panic. it is unclear for what reason it appears, since there is no way to view the problematic client file. maybe it's the version? has anyone encountered such behavior?
Log
panic: runtime error: index out of range [0] with length 0
goroutine 2773676 [running]:
github.com/xuri/excelize/v2.checkSheet(0xc00bcff880)
/root/go/pkg/mod/github.com/xuri/excelize/v2@v2.7.0/excelize.go:311 +0x490
github.com/xuri/excelize/v2.(*File).workSheetReader(0xc0097fcd00, {0xc002eaec48, 0x8})
/root/go/pkg/mod/github.com/xuri/excelize/v2@v2.7.0/excelize.go:268 +0x714
github.com/xuri/excelize/v2.(*File).getCellStringFunc(0xc009bbe000?, {0xc002eaec48?, 0xc00983df80?}, {0xc002eaf8ac, 0x2}, 0x31aaa18)
/root/go/pkg/mod/github.com/xuri/excelize/v2@v2.7.0/cell.go:1272 +0x79
github.com/xuri/excelize/v2.(*File).GetCellType(0x30532d0?, {0xc002eaec48?, 0xc00983df80?}, {0xc002eaf8ac?, 0x2?})
/root/go/pkg/mod/github.com/xuri/excelize/v2@v2.7.0/cell.go:87 +0x2a
here is the file that was provided to me, but it does not cause panic, but perhaps reflects the structure of the client's file: panic_import_ob (1).xlsx
Subject of the issue
I get the following panic when using the library
github.com/xuri/excelize/v2
:panic: runtime error: index out of range [0] with length 0
Your environment
Steps to reproduce
the client had a panic. for what reason is unclear the code is approximately as follows
Actual behaviour
panic occurs when the
getCellType
method is called in thecellType, err := fileXlsx.GetCellType(sheet, axis.getAxis())
Expected behaviour
there should obviously be no panic. it is unclear for what reason it appears, since there is no way to view the problematic client file. maybe it's the version? has anyone encountered such behavior?
Log
here is the file that was provided to me, but it does not cause panic, but perhaps reflects the structure of the client's file: panic_import_ob (1).xlsx