Browse Source

fix a bug with incorrectly File.Sheets order

bronze1man 11 years ago
parent
commit
77c52ebc89
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib.go

+ 1 - 1
lib.go

@@ -456,7 +456,7 @@ func readSheetsFromZipFile(f *zip.File, file *File, sheetXMLMap map[string]strin
 			return nil, nil, sheet.Error
 		}
 		sheetsByName[workbook.Sheets.Sheet[sheet.Index].Name] = sheet.Sheet
-		sheets[j] = sheet.Sheet
+		sheets[sheet.Index] = sheet.Sheet
 	}
 	return sheetsByName, sheets, nil
 }