Documentation ¶
Index ¶
- func ColumnNumberToText(columnNumber int) (string, error)
- func ColumnTextToNumber(columnText string) int
- func ReadDemo(filename string)
- func WriteDemo(filename string)
- type Cell
- func (r *Cell) GetBorder() *array.AnyArray[border]
- func (r *Cell) GetContent() any
- func (r *Cell) GetContentType() CellContentType
- func (r *Cell) GetCoordinate() string
- func (r *Cell) GetFontBold() bool
- func (r *Cell) GetFontFamily() string
- func (r *Cell) GetFontItalic() bool
- func (r *Cell) GetFontRgb() string
- func (r *Cell) GetFontSize() float64
- func (r *Cell) GetPatternRgb() string
- func (r *Cell) Init(content any) *Cell
- func (r *Cell) SetBorderBottomRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderBottomRgb(borderBottomRgb string, condition bool) *Cell
- func (r *Cell) SetBorderBottomStyle(borderBottomStyle int, condition bool) *Cell
- func (r *Cell) SetBorderBottomStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetBorderDiagonalDownRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderDiagonalDownRgb(borderDiagonalDownRgb string, condition bool) *Cell
- func (r *Cell) SetBorderDiagonalDownStyle(borderDiagonalDownStyle int, condition bool) *Cell
- func (r *Cell) SetBorderDiagonalDownStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetBorderDiagonalUpRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderDiagonalUpRgb(borderDiagonalUpRgb string, condition bool) *Cell
- func (r *Cell) SetBorderDiagonalUpStyle(borderDiagonalUpStyle int, condition bool) *Cell
- func (r *Cell) SetBorderDiagonalUpStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetBorderLeftRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderLeftRgb(borderLeftRgb string, condition bool) *Cell
- func (r *Cell) SetBorderLeftStyle(borderLeftStyle int, condition bool) *Cell
- func (r *Cell) SetBorderLeftStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetBorderRightRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderRightRgb(borderRightRgb string, condition bool) *Cell
- func (r *Cell) SetBorderRightStyle(borderRightStyle int, condition bool) *Cell
- func (r *Cell) SetBorderRightStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetBorderSurrounding(borderRgb string, borderStyle int, condition bool) *Cell
- func (r *Cell) SetBorderSurroundingFunc(condition func() (string, int, bool)) *Cell
- func (r *Cell) SetBorderTopRbgFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetBorderTopRgb(borderTopRgb string, condition bool) *Cell
- func (r *Cell) SetBorderTopStyle(borderTopStyle int, condition bool) *Cell
- func (r *Cell) SetBorderTopStyleFunc(condition func() (int, bool)) *Cell
- func (r *Cell) SetContent(content any) *Cell
- func (r *Cell) SetContentType(contentType CellContentType) *Cell
- func (r *Cell) SetCoordinate(coordinate string) *Cell
- func (r *Cell) SetFontBold(fontBold bool, condition bool) *Cell
- func (r *Cell) SetFontBoldFunc(condition func() (bool, bool)) *Cell
- func (r *Cell) SetFontFamily(fontFamily string, condition bool) *Cell
- func (r *Cell) SetFontFamilyFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetFontItalic(fontItalic bool, condition bool) *Cell
- func (r *Cell) SetFontItalicFunc(condition func() (bool, bool)) *Cell
- func (r *Cell) SetFontRgb(fontRgb string, condition bool) *Cell
- func (r *Cell) SetFontRgbFunc(condition func() (string, bool)) *Cell
- func (r *Cell) SetFontSize(fontSize float64, condition bool) *Cell
- func (r *Cell) SetFontSizeFunc(condition func() (float64, bool)) *Cell
- func (r *Cell) SetPatternRgb(patternRgb string, condition bool) *Cell
- func (r *Cell) SetPatternRgbFunc(condition func() (string, bool)) *Cell
- type CellContentType
- type Reader
- func (r *Reader) AutoRead(filename string, values ...any) *Reader
- func (r *Reader) AutoReadBySheetName(filename, sheetName string, values ...any) *Reader
- func (r *Reader) Data() *dict.AnyOrderlyDict[uint64, *array.AnyArray[string]]
- func (r *Reader) DataWithTitle() (*dict.AnyOrderlyDict[uint64, *dict.AnyDict[string, string]], error)
- func (r *Reader) GetFinishedRow() int
- func (r *Reader) GetOriginalRow() int
- func (r *Reader) GetSheetName() string
- func (r *Reader) GetTitle() *array.AnyArray[string]
- func (r *Reader) GetTitleRow() int
- func (r *Reader) OpenFile(filename string, more ...any) *Reader
- func (r *Reader) Read() *Reader
- func (r *Reader) ReadTitle() *Reader
- func (r *Reader) SetDataByRow(rowNumber uint64, data []string) *Reader
- func (r *Reader) SetFinishedRow(finishedRow int) *Reader
- func (r *Reader) SetOriginalRow(originalRow int) *Reader
- func (r *Reader) SetSheetName(sheetName string) *Reader
- func (r *Reader) SetTitle(titles []string) *Reader
- func (r *Reader) SetTitleRow(titleRow int) *Reader
- func (r *Reader) ToDataFrame(titleWithType map[string]series.Type) dataframe.DataFrame
- func (r *Reader) ToDataFrameDefaultType() dataframe.DataFrame
- func (r *Reader) ToDataFrameDetectType() dataframe.DataFrame
- type Row
- type Writer
- func (r *Writer) ActiveSheetByIndex(sheetIndex int) *Writer
- func (r *Writer) ActiveSheetByName(sheetName string) *Writer
- func (r *Writer) AddRow(excelRow *Row) *Writer
- func (r *Writer) CreateSheet(sheetName string) *Writer
- func (r *Writer) Download(writer http.ResponseWriter) error
- func (r *Writer) GetExcelizeFile() *excelize.File
- func (r *Writer) GetFilename() string
- func (r *Writer) Init(filename string) *Writer
- func (r *Writer) Save() error
- func (r *Writer) SetFilename(filename string) *Writer
- func (r *Writer) SetRows(excelRows []*Row) *Writer
- func (r *Writer) SetTitleRow(titles []string, rowNumber uint64) *Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnNumberToText ¶
ColumnNumberToText 列索引转文字
Types ¶
type Cell ¶ added in v2.2.0
type Cell struct {
// contains filtered or unexported fields
}
Cell Excel单元格
func NewCellFormula ¶ added in v2.2.1
NewCellFormula 实例化:公式
func (*Cell) GetContentType ¶ added in v2.2.0
func (r *Cell) GetContentType() CellContentType
GetContentType 获取单元格类型
func (*Cell) GetCoordinate ¶ added in v2.2.0
GetCoordinate 获取单元格坐标
func (*Cell) GetFontFamily ¶ added in v2.2.0
GetFontFamily 获取字体
func (*Cell) GetFontItalic ¶ added in v2.2.0
GetFontItalic 获取字体斜体
func (*Cell) GetPatternRgb ¶ added in v2.2.1
GetPatternRgb 获取填充色
func (*Cell) SetBorderBottomRbgFunc ¶ added in v2.2.1
SetBorderBottomRbgFunc 设置边框颜色:下 函数
func (*Cell) SetBorderBottomRgb ¶ added in v2.2.1
SetBorderBottomRgb 设置边框颜色:下
func (*Cell) SetBorderBottomStyle ¶ added in v2.2.1
SetBorderBottomStyle 设置边框样式:下
func (*Cell) SetBorderBottomStyleFunc ¶ added in v2.2.1
SetBorderBottomStyleFunc 设置边框样式:下 函数
func (*Cell) SetBorderDiagonalDownRbgFunc ¶ added in v2.2.1
SetBorderDiagonalDownRbgFunc 设置边框颜色:对角线下 函数
func (*Cell) SetBorderDiagonalDownRgb ¶ added in v2.2.1
SetBorderDiagonalDownRgb 设置边框颜色:对角线下
func (*Cell) SetBorderDiagonalDownStyle ¶ added in v2.2.1
SetBorderDiagonalDownStyle 设置边框样式:对角线下
func (*Cell) SetBorderDiagonalDownStyleFunc ¶ added in v2.2.1
SetBorderDiagonalDownStyleFunc 设置边框样式:对角线下 函数
func (*Cell) SetBorderDiagonalUpRbgFunc ¶ added in v2.2.1
SetBorderDiagonalUpRbgFunc 设置边框颜色:对角线上 函数
func (*Cell) SetBorderDiagonalUpRgb ¶ added in v2.2.1
SetBorderDiagonalUpRgb 设置边框颜色:对角线上
func (*Cell) SetBorderDiagonalUpStyle ¶ added in v2.2.1
SetBorderDiagonalUpStyle 设置边框样式:对角线上
func (*Cell) SetBorderDiagonalUpStyleFunc ¶ added in v2.2.1
SetBorderDiagonalUpStyleFunc 设置边框样式:对角线上 函数
func (*Cell) SetBorderLeftRbgFunc ¶ added in v2.2.1
SetBorderLeftRbgFunc 设置边框颜色:左 函数
func (*Cell) SetBorderLeftRgb ¶ added in v2.2.1
SetBorderLeftRgb 设置边框颜色:左
func (*Cell) SetBorderLeftStyle ¶ added in v2.2.1
SetBorderLeftStyle 设置边框样式:左
func (*Cell) SetBorderLeftStyleFunc ¶ added in v2.2.1
SetBorderLeftStyleFunc 设置边框样式:左 函数
func (*Cell) SetBorderRightRbgFunc ¶ added in v2.2.1
SetBorderRightRbgFunc 设置边框颜色:右 函数
func (*Cell) SetBorderRightRgb ¶ added in v2.2.1
SetBorderRightRgb 设置边框颜色:右
func (*Cell) SetBorderRightStyle ¶ added in v2.2.1
SetBorderRightStyle 设置边框样式:右
func (*Cell) SetBorderRightStyleFunc ¶ added in v2.2.1
SetBorderRightStyleFunc 设置边框样式:右 函数
func (*Cell) SetBorderSurrounding ¶ added in v2.2.1
SetBorderSurrounding 设置四周边框
func (*Cell) SetBorderSurroundingFunc ¶ added in v2.2.1
SetBorderSurroundingFunc 设置四周边框 函数
func (*Cell) SetBorderTopRbgFunc ¶ added in v2.2.1
SetBorderTopRbgFunc 设置边框颜色:上 函数
func (*Cell) SetBorderTopRgb ¶ added in v2.2.1
SetBorderTopRgb 设置边框颜色:上
func (*Cell) SetBorderTopStyle ¶ added in v2.2.1
SetBorderTopStyle 设置边框样式:上
func (*Cell) SetBorderTopStyleFunc ¶ added in v2.2.1
SetBorderTopStyleFunc 设置边框样式:上 函数
func (*Cell) SetContent ¶ added in v2.2.0
SetContent 设置内容
func (*Cell) SetContentType ¶ added in v2.2.0
func (r *Cell) SetContentType(contentType CellContentType) *Cell
SetContentType 设置单元格类型
func (*Cell) SetCoordinate ¶ added in v2.2.0
SetCoordinate 设置单元格坐标
func (*Cell) SetFontBold ¶ added in v2.2.0
SetFontBold 设置字体粗体
func (*Cell) SetFontBoldFunc ¶ added in v2.2.1
SetFontBoldFunc 设置字体粗体:函数
func (*Cell) SetFontFamily ¶ added in v2.2.0
SetFontFamily 设置字体
func (*Cell) SetFontFamilyFunc ¶ added in v2.2.1
SetFontFamilyFunc 设置字体:函数
func (*Cell) SetFontItalic ¶ added in v2.2.0
SetFontItalic 设置字体斜体
func (*Cell) SetFontItalicFunc ¶ added in v2.2.1
SetFontItalicFunc 设置字体斜体:函数
func (*Cell) SetFontRgb ¶ added in v2.2.1
SetFontRgb 设置字体颜色
func (*Cell) SetFontRgbFunc ¶ added in v2.2.1
SetFontRgbFunc 设置字体颜色:函数
func (*Cell) SetFontSize ¶ added in v2.2.0
SetFontSize 设置字体字号
func (*Cell) SetFontSizeFunc ¶ added in v2.2.1
SetFontSizeFunc 设置字体字号:函数
func (*Cell) SetPatternRgb ¶ added in v2.2.1
SetPatternRgb 设置填充色
type CellContentType ¶ added in v2.2.0
type CellContentType string
CellContentType 单元格内容类型
const ( CellContentTypeAny CellContentType = "any" CellContentTypeFormula CellContentType = "formula" CellContentTypeInt CellContentType = "int" CellContentTypeFloat64 CellContentType = "float64" CellContentTypeBool CellContentType = "bool" CellContentTypeTime CellContentType = "time" )
type Reader ¶ added in v2.2.0
type Reader struct { Err error // contains filtered or unexported fields }
Reader Excel读取器
func (*Reader) AutoReadBySheetName ¶ added in v2.2.0
AutoReadBySheetName 自动读取(默认第一行是表头,从第二行开始)
func (*Reader) DataWithTitle ¶ added in v2.2.1
func (r *Reader) DataWithTitle() (*dict.AnyOrderlyDict[uint64, *dict.AnyDict[string, string]], error)
DataWithTitle 获取数据:带有title的有序字典
func (*Reader) GetFinishedRow ¶ added in v2.2.0
GetFinishedRow 获取读取终止行
func (*Reader) GetOriginalRow ¶ added in v2.2.0
GetOriginalRow 获取读取起始行
func (*Reader) GetSheetName ¶ added in v2.2.0
GetSheetName 获取工作表名称
func (*Reader) SetDataByRow ¶ added in v2.2.0
SetDataByRow 设置单行数据
func (*Reader) SetFinishedRow ¶ added in v2.2.0
SetFinishedRow 设置读取终止行
func (*Reader) SetOriginalRow ¶ added in v2.2.0
SetOriginalRow 设置读取起始行
func (*Reader) SetSheetName ¶ added in v2.2.0
SetSheetName 设置工作表名称
func (*Reader) SetTitleRow ¶ added in v2.2.0
SetTitleRow 设置表头行
func (*Reader) ToDataFrame ¶ added in v2.2.0
ToDataFrame 获取DataFrame类型数据
func (*Reader) ToDataFrameDefaultType ¶ added in v2.2.0
ToDataFrameDefaultType 获取DataFrame类型数据 通过Excel表头自定义数据类型
func (*Reader) ToDataFrameDetectType ¶ added in v2.2.0
ToDataFrameDetectType 获取DataFrame类型数据 通过自动探寻数据类型
type Row ¶ added in v2.2.0
type Row struct { Err error // contains filtered or unexported fields }
Row Excel行
func (*Row) SetRowNumber ¶ added in v2.2.0
SetRowNumber 设置行标
type Writer ¶ added in v2.2.0
type Writer struct { Err error // contains filtered or unexported fields }
Writer Excel写入器
func (*Writer) ActiveSheetByIndex ¶ added in v2.2.0
ActiveSheetByIndex 选择工作表(根据编号)
func (*Writer) ActiveSheetByName ¶ added in v2.2.0
ActiveSheetByName 选择工作表(根据名称)
func (*Writer) CreateSheet ¶ added in v2.2.0
CreateSheet 创建工作表
func (*Writer) Download ¶ added in v2.2.7
func (r *Writer) Download(writer http.ResponseWriter) error
Download 下载Excel
func (*Writer) GetExcelizeFile ¶ added in v2.2.8
func (r *Writer) GetExcelizeFile() *excelize.File
GetExcelizeFile 获取excelize文件对象
func (*Writer) GetFilename ¶ added in v2.2.0
GetFilename 获取文件名
func (*Writer) SetFilename ¶ added in v2.2.0
SetFilename 设置文件名