|
@@ -584,6 +584,7 @@ func LzExportExcel() {
|
|
|
row.AddCell()
|
|
|
}
|
|
|
} else {
|
|
|
+ endRowIndex := 0
|
|
|
for rk, dv := range dataList {
|
|
|
rowIndex := 5 + rk
|
|
|
row, err := sheetNew.Row(rowIndex)
|
|
@@ -594,12 +595,28 @@ func LzExportExcel() {
|
|
|
row.AddCell().SetValue(dv.Dt)
|
|
|
row.AddCell().SetFloat(dv.Close)
|
|
|
row.AddCell()
|
|
|
+ endRowIndex = rowIndex
|
|
|
+ }
|
|
|
+ if len(dataList) < dataMax {
|
|
|
+ dataLen := dataMax - len(dataList)
|
|
|
+ for n := 0; n < dataLen; n++ {
|
|
|
+ rowIndex := (endRowIndex + 1) + n
|
|
|
+ row, err := sheetNew.Row(rowIndex)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add row err:" + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ row.AddCell()
|
|
|
+ row.AddCell()
|
|
|
+ row.AddCell()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- err = xlsxFile.Save(downLoadnFilePath)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
+ }
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
+ fmt.Print("downLoadnFilePath:",downLoadnFilePath)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
}
|
|
|
}
|