Browse Source

Merge branch 'aj_guagnzhouqihuo' into debug

tuoling805 1 year ago
parent
commit
bab1fd6e35
1 changed files with 6 additions and 1 deletions
  1. 6 1
      controllers/data_source/guagnzhouqihuo.go

+ 6 - 1
controllers/data_source/guagnzhouqihuo.go

@@ -356,7 +356,12 @@ func (this *DataSourceController) ExportGfexIndexDetail() {
 
 	downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
 	xlsxFile := xlsx.NewFile()
-	sheetNew := xlsxFile.Sheets[0]
+	sheetNew, err := xlsxFile.AddSheet("详情")
+	if err != nil {
+		br.ErrMsg = "导出失败,Err:" + err.Error()
+		br.Msg = "导出失败"
+		return
+	}
 	titleRow := sheetNew.AddRow()
 	titleRow.AddCell().SetValue("指标ID")
 	titleRow.AddCell().SetValue("指标名称")