mirror of
https://gitee.com/winc-link/hummingbird.git
synced 2025-04-21 08:52:42 +00:00
22 lines
290 B
Go
22 lines
290 B
Go
package dtos
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/xuri/excelize/v2"
|
|
)
|
|
|
|
type ImportFile struct {
|
|
Excel *excelize.File
|
|
}
|
|
|
|
func NewImportFile(f io.Reader) (*ImportFile, error) {
|
|
file, err := excelize.OpenReader(f)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ImportFile{
|
|
Excel: file,
|
|
}, nil
|
|
}
|