mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-06 00:27:00 +08:00
优化
This commit is contained in:
@@ -11,6 +11,13 @@ import (
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
/**
|
||||
* @Description: 获取导入数据
|
||||
* @param file 上传的文件
|
||||
* @param dst 导入目标对象【传指针】
|
||||
* @param cols 列信息
|
||||
* @return err
|
||||
*/
|
||||
func GetExcelData(file multipart.File, dst interface{}, cols []Col) (err error) {
|
||||
// 创建缓冲区
|
||||
buf := new(bytes.Buffer)
|
||||
|
Reference in New Issue
Block a user