Documentation
¶
Index ¶
- Variables
- func AddSheetByMap(excel *xlsx.File, sheetName string, mapDatas []map[string]interface{}, ...) error
- func AddSheetByStruct(excel *xlsx.File, sheetName string, records interface{}) error
- func AddSheetByTitleMap(excel *xlsx.File, sheetName string, mapDatas []map[string]interface{}, ...) error
- func AddSheetByTitleMapString(excel *xlsx.File, sheetName string, mapDatas []map[string]string, ...) error
- func AddSheetByTitlePointerMap(excel *xlsx.File, sheetName string, mapDatas []map[string]*string, ...) error
- func BatchInsertListDataByExcelize(f *excelize.File, SheetName string, rows []map[string]string, ...) (err error)
- func ChangeCellColor(file *xlsx.File, list *list.List) *xlsx.File
- func DataToExcelEntity(dataEntity []map[string]string, isMain bool, langCode string) (listobj []sysmodel.ExcelEntity)
- func ExportExcelFromMap(sheetName string, headers []string, mapDatas []map[string]interface{}, ...) error
- func ExportExcelFromMapByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]interface{}, ...) error
- func ExportExcelFromMapStringByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]string, ...) error
- func ExportExcelFromPointerMapByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]*string, ...) error
- func ExportExcelFromStruct(sheetName string, records interface{}, outPath string) error
- func GetCellString(cell *xlsx.Cell) (cellString string)
- func GetStringValueFromCell(cell *xlsx.Cell) string
- func HasTitle(list []sysmodel.ExcelEntity, obj string, param string) int
- func IsNullRow(row *xlsx.Row) (result bool)
- func RemoveZero(value string) string
- type TtileByKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ExcelRegexpNumberType = regexp.MustCompile(`\b(int|tinyint|smallint|mediumint|bigint|float|double|decimal|numeric)\b`)
Functions ¶
func AddSheetByMap ¶
func AddSheetByMap(excel *xlsx.File, sheetName string, mapDatas []map[string]interface{}, headers []string) error
最小工作表名称长度为 1 个字符。 最大工作表名称长度为 31 个字符。 这些特殊字符也不允许: / ?* [ ]
func AddSheetByStruct ¶
func AddSheetByTitleMap ¶
func BatchInsertListDataByExcelize ¶
func BatchInsertListDataByExcelize(f *excelize.File, SheetName string, rows []map[string]string, titles []map[string]string) (err error)
BatchInsertListDataByExcelize 引用包:github.com/360EntSecGroup-Skylar/excelize 批量插入数据到excel,
func DataToExcelEntity ¶
func ExportExcelFromMap ¶
func ExportExcelFromMap(sheetName string, headers []string, mapDatas []map[string]interface{}, outPath string) error
map导出excel
func ExportExcelFromMapByTitleMap ¶
func ExportExcelFromMapByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]interface{}, outPath string) error
map导出excel headers {字段名:标题名}
func ExportExcelFromMapStringByTitleMap ¶
func ExportExcelFromMapStringByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]string, outPath string) error
map导出excel headers {字段名:标题名}
func ExportExcelFromPointerMapByTitleMap ¶
func ExportExcelFromPointerMapByTitleMap(sheetName string, headers []TtileByKey, mapDatas []map[string]*string, outPath string) error
map导出excel headers {字段名:标题名}
func ExportExcelFromStruct ¶
struct根据tag导出excel
func GetCellString ¶
func GetStringValueFromCell ¶
func RemoveZero ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.