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
Steps to reproduce the issue:
1.use oracle databases get 48000+ datas
2.use goroute Write the data to Excel
3.An error "panic: runtime error: index out of range [321] with length 321"
Describe the results you received:
for k,v := range data{
go func(k int,v map[string]string) {
waitgroup.Add(1)
fmt.Println("-----",k,v)
//行数k
a := 0
for _,j:= range []string{"STORE_NAME","ORIGINAL_STRUCT_NAME","CONTRACT_NO","CUSTOMER_NAME","APPROVED_AMOUNT","BORROW_MONEY","CONTRACT_DURATION","REPAY_WAY","LEND_DATE" ,"FISRT_PERIOD_REPAY","LAST_PERIOD_REPAY","FIRST_JH_MONEY","MONTH_JH_MONEY","REPAY_DATE","JH_MONEY","SY_REPAY_PRINCIPAL","SETTLE_PERIOD","IS_SETTLE","YQ_DAYS"} {
col := GetLetterByNum(a+1)
fmt.Println("数据:",col + strconv.Itoa(k+2),v[j])
xlsx.SetCellValue("Sheet1",col + strconv.Itoa(k+2),v[j])
a ++
}
defer waitgroup.Done()
}(k,v)
}
waitgroup.Wait()
fmt.Println("开始保存表格......")
err := xlsx.SaveAs("C:\\Users\\Administrator.000\\Desktop\\Workbook.xlsx")
Describe the results you expected:
panic: runtime error: index out of range [321] with length 321
goroutine 37 [running]:
github.com/360EntSecGroup-Skylar/excelize.completeRow(0xc000092640, 0x1c0, 0x1)
E:/GOPATH/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize@v1.4.1/rows.go:486 +0x54f
github.com/360EntSecGroup-Skylar/excelize.(*File).SetCellStr(0xc000342000, 0x645df8, 0x6, 0xc00018479c, 0x4, 0xc0002f8b30, 0xf)
E:/GOPATH/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize@v1.4.1/cell.go:498 +0x193
github.com/360EntSecGroup-Skylar/excelize.(*File).SetCellValue(0xc000342000, 0x645df8, 0x6, 0xc00018479c, 0x4, 0x5f8c20, 0xc0001820f0)
E:/GOPATH/pkg/mod/github.com/360!ent!sec!group-!skylar/excelize@v1.4.1/cell.go:77 +0x586
main.handledata.func1(0xc000342000, 0x1be, 0xc0002ab440)
D:/GoleGolas/sql/InterfaceOracle/main.go:151 +0x3f8
created by main.handledata
D:/GoleGolas/sql/InterfaceOracle/main.go:143 +0x248
Output of go version:
1.14
Excelize version or commit ID:
latest
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered:
This lib is not concurrently safe currently (under v2.2.0), it will support to set cell values concurrent in the next version (v2.3.0). You can try to upgrade the library with the master branch code.
Description
Steps to reproduce the issue:
1.use oracle databases get 48000+ datas
2.use goroute Write the data to Excel
3.An error "panic: runtime error: index out of range [321] with length 321"
Describe the results you received:
Describe the results you expected:
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered: