You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of rel.Target is "/xl/worksheets/sheet1.xml", and convert failed.
The value of rID always be "0".The next sheet always replace the previous.
I thing that's why the result map only contain the last sheet.
Steps to reproduce the issue:
xlsx, err := excelize.OpenFile("./1.xlsx")
if err != nil {
fmt.Println(err)
return false
}
for index, name := range xlsx.GetSheetMap() {
fmt.Println(index, name)
}
Output of go version:
go version go1.9.2 darwin/amd64
Excelize version or commit ID:
1.4
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OS 10.13.6 1.xlsx
The text was updated successfully, but these errors were encountered:
When using GetSheetMap(), the result map only contain last sheet
When I parse xlsx file by using GetSheetMap(), the result map only contain one sheet(the last sheet).But actually there are about 70 sheets.
when I debug into the implement of GetSheetMap(), I found that err occurs here:
rID, _ := strconv.Atoi(strings.TrimSuffix(strings.TrimPrefix(rel.Target, "worksheets/sheet"), ".xml"))
The value of rel.Target is "/xl/worksheets/sheet1.xml", and convert failed.
The value of rID always be "0".The next sheet always replace the previous.
I thing that's why the result map only contain the last sheet.
Steps to reproduce the issue:
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OS 10.13.6
1.xlsx
The text was updated successfully, but these errors were encountered: