Documentation ¶
Overview ¶
Package in @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExcelImport ¶
type ExcelImport struct { }
func (*ExcelImport) ImportBySheet ¶
func (c *ExcelImport) ImportBySheet(sheetName string, f *excelize.File, dst interface{}, headIndex, startRow int) (err error)
ImportBySheet 导入数据(读取指定sheet)sheetName Sheet名称
func (*ExcelImport) ImportExcel ¶
func (c *ExcelImport) ImportExcel(f *excelize.File, dst interface{}, headIndex, startRow int) (err error)
ImportExcel 导入数据(单个sheet) 需要在传入的结构体中的字段加上tag:excel:"title:列头名称;" @param f 获取到的excel对象、dst 导入目标对象【传指针】 @param headIndex 表头的索引,从0开始(用于获取表头名字) @param startRow 头行行数(从第startRow+1行开始扫)
Click to show internal directories.
Click to hide internal directories.