|
@@ -56,17 +56,18 @@ func GetLongZhongTargetInfoByExcel() {
|
|
|
//maxCol := v.MaxCol
|
|
|
fmt.Println(classifyName, maxRow)
|
|
|
for i := 0; i < maxRow; i++ {
|
|
|
- row, _ := v.Row(i)
|
|
|
+ row := v.Row(i)
|
|
|
longzhongClassify := ""
|
|
|
if i > 0 {
|
|
|
- longzhongClassifyNew := row.GetCell(0).String()
|
|
|
+ cells := row.Cells
|
|
|
+ longzhongClassifyNew := cells[0].String()
|
|
|
if longzhongClassifyNew != "" {
|
|
|
longzhongClassify = longzhongClassifyNew
|
|
|
}
|
|
|
- secName := row.GetCell(1).Value
|
|
|
- frequency := row.GetCell(2).Value
|
|
|
- LongzhongId := row.GetCell(3).Value
|
|
|
- remark := row.GetCell(4).String()
|
|
|
+ secName := cells[1].Value
|
|
|
+ frequency := cells[2].Value
|
|
|
+ LongzhongId := cells[3].Value
|
|
|
+ remark := cells[4].String()
|
|
|
item := new(models.DataSourceLongzhong)
|
|
|
item.ClassifyId = classifyId
|
|
|
item.ClassifyName = classifyName
|
|
@@ -581,7 +582,7 @@ func LzExportExcel() {
|
|
|
if len(dataList) <= 0 {
|
|
|
for n := 0; n < dataMax; n++ {
|
|
|
rowIndex := 5 + n
|
|
|
- row, _ := sheetNew.Row(rowIndex)
|
|
|
+ row:= sheetNew.Row(rowIndex)
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
@@ -590,7 +591,7 @@ func LzExportExcel() {
|
|
|
endRowIndex := 0
|
|
|
for rk, dv := range dataList {
|
|
|
rowIndex := 5 + rk
|
|
|
- row, _ := sheetNew.Row(rowIndex)
|
|
|
+ row := sheetNew.Row(rowIndex)
|
|
|
row.AddCell().SetValue(dv.Dt)
|
|
|
row.AddCell().SetFloat(dv.Close)
|
|
|
row.AddCell()
|
|
@@ -600,7 +601,7 @@ func LzExportExcel() {
|
|
|
dataLen := dataMax - len(dataList)
|
|
|
for n := 0; n < dataLen; n++ {
|
|
|
rowIndex := (endRowIndex + 1) + n
|
|
|
- row, _ := sheetNew.Row(rowIndex)
|
|
|
+ row:= sheetNew.Row(rowIndex)
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
@@ -890,7 +891,7 @@ func LzPriceExportExcel() {
|
|
|
if len(dataList) <= 0 {
|
|
|
for n := 0; n < dataMax; n++ {
|
|
|
rowIndex := 8 + n
|
|
|
- row,_:= sheetNew.Row(rowIndex)
|
|
|
+ row:= sheetNew.Row(rowIndex)
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
@@ -901,7 +902,7 @@ func LzPriceExportExcel() {
|
|
|
endRowIndex := 0
|
|
|
for rk, dv := range dataList {
|
|
|
rowIndex := 8 + rk
|
|
|
- row,_:= sheetNew.Row(rowIndex)
|
|
|
+ row:= sheetNew.Row(rowIndex)
|
|
|
row.AddCell().SetValue(dv.PriceDate)
|
|
|
row.AddCell().SetFloat(dv.Price)
|
|
|
row.AddCell().SetFloat(dv.LowPrice)
|
|
@@ -914,7 +915,7 @@ func LzPriceExportExcel() {
|
|
|
dataLen := dataMax - len(dataList)
|
|
|
for n := 0; n < dataLen; n++ {
|
|
|
rowIndex := (endRowIndex + 1) + n
|
|
|
- row,_:= sheetNew.Row(rowIndex)
|
|
|
+ row:= sheetNew.Row(rowIndex)
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|
|
|
row.AddCell()
|