tealeg / xlsx

Go library for reading and writing XLSX files.
Other
5.88k stars 818 forks source link

reader crashes form xlsx files with auto filter (drop down) in title #817

Open ivantextmagic opened 2 months ago

ivantextmagic commented 2 months ago

xlsx/lib.go:705 +0x3c\npanic({0x104c83b00?, 0x140000ccbd0?})\n\t/usr/local/go/src/runtime/panic.go:770 +0x124\ngithub.com/tealeg/xlsx/v3.readSheetFromFile({{0x1400030e280, 0x1f}, {0x1051249a8, 0x1}, {0x140006105b8, 0x4}, {0x0, 0x0}}, 0x140000e03f0, 0x1400049c010?, ...)\n\t/xlsx/lib.go:738 +0x5b4\nxlsx/v3.readSheetsFromZipFile.func2()\n\t/xlsx/lib.go:803

file attached below past-r.xlsx

UPD this place has issue /xlsx/lib.go:736

if worksheet.AutoFilter != nil {
    autoFilterBounds := strings.Split(worksheet.AutoFilter.Ref, ":")
    sheet.AutoFilter = &AutoFilter{autoFilterBounds[0], autoFilterBounds[1]}
}

autoFilterBounds[1] does not exist

github-actions[bot] commented 5 days ago

Stale issue message