feat:优化项目信息

This commit is contained in:
henry
2022-03-28 07:01:33 +08:00
parent 60adce4d54
commit 07f94fd663
2 changed files with 168 additions and 0 deletions

26
lib/excel_test.go Normal file
View File

@ -0,0 +1,26 @@
package lib
import "testing"
func TestNewExcel(t *testing.T) {
content := make([]interface{}, 0)
for i := 0; i < 2; i++ {
content = append(content, []interface{}{
"戴恒顺", i + 1 + 1,
})
}
excel := NewExcel(WithExcelName("测试"), WithExcelSheet("专家信息"),
WithExcelTitle([]string{"姓名", "年龄"}), WithExcelContent(&ExcelContent{
Kind: 0,
Content: content,
}))
err := excel.Export()
if err != nil {
t.Log(err)
return
}
err = excel.Save("./lib")
t.Log(err)
}