作者 yangfu

计算集导出修改

... ... @@ -83,8 +83,11 @@ func (querySetService *QuerySetService) CalculateSetExport(ctx *domain.Context,
var fields []string
filename := fmt.Sprintf("%v_%v.xlsx", querySet.Name, time.Now().Format("060102150405"))
path := fmt.Sprintf("public/%v", filename)
for _, f := range dataTable.Fields {
fields = append(fields, f.Name)
}
excelWriter := excel.NewXLXSWriterTo(fields, dataTable.Data)
excelWriter.IgnoreTitle = true
excelWriter.IgnoreTitle = false
if err = excelWriter.Save(path); err != nil {
return nil, factory.FastError(err)
}
... ...