【修复】导出功能

This commit is contained in:
PandaGoAdmin
2022-07-13 19:06:25 +08:00
parent 433ee08634
commit 63916db425
8 changed files with 23 additions and 53 deletions

View File

@@ -2,10 +2,8 @@ package utils
import (
"fmt"
"github.com/kakuilan/kgo"
"github.com/xuri/excelize/v2"
"reflect"
"time"
)
func ExportExcel(head []string, datas [][]any, filePath string) error {
@@ -19,8 +17,8 @@ func ExportExcel(head []string, datas [][]any, filePath string) error {
return nil
}
func GetFileName(path, model string) string {
return path + fmt.Sprintf("%s_%s.xlsx", model, kgo.KTime.Date("20060102150405", time.Now()))
func GetFileName(path, filename string) string {
return path + filename
}
func InterfaceToExcel(data any, fileName string) {