Documentation ¶
Overview ¶
excel @since 0.0.11 模板生成
Index ¶
- Constants
- func APIPostExportExcel(c *gin.Context)
- func CenterStyle(f *excelize.File) int
- func ColDataToInterface(c interface{}) interface{}
- func FormColumnsToInterface(formColumns []table.Column) []interface{}
- func FormDataWriteExcel(file *excelize.File, columns []table.Column, nowRow int, data interface{}) (error, int)
- func GetValueFromMapStringInterface(i interface{}, key string) (interface{}, error)
- func MakeTitle(file *excelize.File, title string, columns []interface{}) error
- func MergeCell(f *excelize.File, sheet string, begin Axis, end Axis) error
- func NewFile() *excelize.File
- func Register()
- func RowsDataToInterface(d interface{}) []interface{}
- func Save(f *excelize.File, name string) error
- func SetColWidth(f *excelize.File, sheet string, axis Axis, width float64) error
- func SetColsWidth(f *excelize.File, sheet string, begin Axis, end Axis, width float64) error
- func SetExcelHeader(file *excelize.File, sheet string, data []Cell, nowRow int) (error, int)
- func SetFreeCell(file *excelize.File, sheet string, header []Cell, nowRow int) (int, error)
- func SetRowCallsValue(f *excelize.File, sheet string, begin Axis, values []interface{}) error
- func SetTitle(f *excelize.File, sheet string, begin Axis, end Axis, value string) error
- type APIPostExportExcelForm
- type Axis
- type Cell
Constants ¶
View Source
const ( A = iota + 65 B C D E F G H I J K L M N O P Q R S T U V W X Y Z )
Variables ¶
This section is empty.
Functions ¶
func APIPostExportExcel ¶ added in v0.0.12
func CenterStyle ¶
CenterStyle 居中的样式 TODO 改成文件级别的全局 @since 0.0.11
func ColDataToInterface ¶ added in v0.0.13
func ColDataToInterface(c interface{}) interface{}
func FormColumnsToInterface ¶ added in v0.0.14
将表单中的列字段转换成 excel 可以写入的格式
func FormDataWriteExcel ¶ added in v0.0.14
func FormDataWriteExcel(file *excelize.File, columns []table.Column, nowRow int, data interface{}) (error, int)
从form 表单中的data字段读取数据 并写入 excel
func GetValueFromMapStringInterface ¶ added in v0.0.14
GetValueFromMapStringInterface
func RowsDataToInterface ¶ added in v0.0.13
func RowsDataToInterface(d interface{}) []interface{}
把各种奇怪的类型如 sql.NullString int64 float64等 转换为 interface{]
func SetColWidth ¶ added in v0.0.12
SetColsWidth 设置字段的宽度 单个单元格 @since 0.0.11
func SetColsWidth ¶
SetColsWidth 设置字段的宽度 连读单元格首尾设置 @since 0.0.11
func SetExcelHeader ¶ added in v0.0.17
func SetFreeCell ¶ added in v0.0.14
任意写值 在一定区段内
func SetRowCallsValue ¶
SetRowCallsValue 横向依次写值 @since 0.0.11
Types ¶
type APIPostExportExcelForm ¶ added in v0.0.12
type Axis ¶
Axis 表示单元格 Row 行 数字 Column excel.A - excel.Z 使用 ToString / ColumnToString 即可快捷转换 @since 0.0.11
func (Axis) ColumnToString ¶
ColumnToString 正确转换列字母 @since 0.0.11
Click to show internal directories.
Click to hide internal directories.