We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.xls文件存在多个sheet栏位
例如想解析sheet2栏位 if xlFile, err := xls.Open(filePath, "utf-8"); err == nil { //第一个sheet sheet := xlFile.GetSheet(1) fmt.Println(sheet.Name) fmt.Println(sheet.MaxRow) }
打印: Sheet2 6 这看起来没什么问题,然而只是多加了一句代码输出行数据时,整个sheet获取就会错乱
if xlFile, err := xls.Open(filePath, "utf-8"); err == nil { //第一个sheet sheet := xlFile.GetSheet(1) fmt.Println(sheet.Name) fmt.Println(sheet.MaxRow) row := sheet.Row(0) fmt.Println(row) } 打印: Sheet1 13730 &{0xc0093f4000 0xc0089d4630 map[0:0xc0089d4ae0 1:0xc0089ded80]}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
.xls文件存在多个sheet栏位
例如想解析sheet2栏位
if xlFile, err := xls.Open(filePath, "utf-8"); err == nil {
//第一个sheet
sheet := xlFile.GetSheet(1)
fmt.Println(sheet.Name)
fmt.Println(sheet.MaxRow)
}
打印:
Sheet2
6
这看起来没什么问题,然而只是多加了一句代码输出行数据时,整个sheet获取就会错乱
if xlFile, err := xls.Open(filePath, "utf-8"); err == nil {
//第一个sheet
sheet := xlFile.GetSheet(1)
fmt.Println(sheet.Name)
fmt.Println(sheet.MaxRow)
row := sheet.Row(0)
fmt.Println(row)
}
打印:
Sheet1
13730
&{0xc0093f4000 0xc0089d4630 map[0:0xc0089d4ae0 1:0xc0089ded80]}
The text was updated successfully, but these errors were encountered: