Documentation ¶
Overview ¶
Package excel @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package excel @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package excel @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Index ¶
- Constants
- func BuildHeader(e *ExcelStyle, sheet, endColName string, headerRowNum int, heads *[]string) (err error)
- func BuildTitle(e *ExcelStyle, sheet, title, endColName string) (dataRow int)
- func BuildTitleHeader(e *ExcelStyle, sheet, title, endColName string, heads *[]string) (dataRow int, err error)
- func GetExcelColumnName(columnNumber int) string
- func IsContain(items interface{}, item interface{}) bool
- type ExcelStyle
- type ExcelTag
Constants ¶
View Source
const ( ExcelTagKey = "excel" Pattern = "name:(.*?);|index:(.*?);|width:(.*?);|needMerge:(.*?);|replace:(.*?);" )
定义正则表达式模式
Variables ¶
This section is empty.
Functions ¶
func BuildHeader ¶
func BuildHeader(e *ExcelStyle, sheet, endColName string, headerRowNum int, heads *[]string) (err error)
BuildHeader 构建表头:headerRowNum 当前表头行行号
func BuildTitle ¶
func BuildTitle(e *ExcelStyle, sheet, title, endColName string) (dataRow int)
BuildTitle 构建标题
func BuildTitleHeader ¶
func BuildTitleHeader(e *ExcelStyle, sheet, title, endColName string, heads *[]string) (dataRow int, err error)
BuildTitleHeader 构建标题和表头:headerRowNum 当前表头行行号
func GetExcelColumnName ¶
GetExcelColumnName 根据列数生成 Excel 列名
Types ¶
type ExcelStyle ¶
type ExcelStyle struct { F *excelize.File // excel 对象 TitleStyle int // 表头样式 HeadStyle int // 表头样式 ContentStyle1 int // 主体样式1,无背景色 ContentStyle2 int // 主体样式2,有背景色 }
ExcelStyle 样式处理
func BuildCustomHeader ¶
func BuildCustomHeader(heads interface{}, sheet, title string) (*ExcelStyle, []string, string, int, error)
BuildCustomHeader 构建自定义复杂表头
Click to show internal directories.
Click to hide internal directories.