mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 10:58:35 +08:00
20 lines
349 B
Go
20 lines
349 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
type User struct {
|
|
Name string `json:"name"`
|
|
Age int64 `json:"age"`
|
|
}
|
|
|
|
func TestExportExcel(t *testing.T) {
|
|
us := make([]User, 0)
|
|
us = append(us, User{Name: "张三", Age: 12})
|
|
us = append(us, User{Name: "李四", Age: 23})
|
|
name := GetFileName("./", "字典")
|
|
t.Log(name)
|
|
InterfaceToExcel(us, name)
|
|
}
|