- ExportMTWaybills
- Obj2Excel
This commit is contained in:
26
business/jxutils/excel/excel_test.go
Normal file
26
business/jxutils/excel/excel_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package excel
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestObj2Excel(t *testing.T) {
|
||||
// kk := make([]*model.SkuName, 1)
|
||||
// kk[0] = &model.SkuName{
|
||||
// Name: "haha",
|
||||
// }
|
||||
|
||||
kk := []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"key1": 1,
|
||||
"key2": 2,
|
||||
"key3": 3,
|
||||
},
|
||||
}
|
||||
cc := &Obj2ExcelSheetConfig{
|
||||
Title: "Title",
|
||||
Data: kk,
|
||||
CaptionList: []string{"key1", "key2", "key3"},
|
||||
}
|
||||
Obj2Excel([]*Obj2ExcelSheetConfig{cc})
|
||||
}
|
||||
Reference in New Issue
Block a user