Documentation ¶
Index ¶
- func GetColumn(col string) (string, error)
- func GetNextAxis(cur string) (string, error)
- func GetNextRow(from, cur int) string
- type Excelizero
- func (x *Excelizero) SaveAs(name string) error
- func (x *Excelizero) WriteHeader(sheetName string, hs []string) error
- func (x *Excelizero) WriteStruct(sheetName string, axis string, obj interface{}) error
- func (x *Excelizero) WriteStructWithTag(sheetName string, fromRow int, sl interface{}) error
- func (x *Excelizero) WriteStructs(sheetName string, axis string, sl interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNextRow ¶
Types ¶
type Excelizero ¶
type Excelizero struct {
// contains filtered or unexported fields
}
func NewExcelizero ¶
func NewExcelizero(f *excelize.File) *Excelizero
func (*Excelizero) SaveAs ¶
func (x *Excelizero) SaveAs(name string) error
func (*Excelizero) WriteHeader ¶
func (x *Excelizero) WriteHeader(sheetName string, hs []string) error
func (*Excelizero) WriteStruct ¶
func (x *Excelizero) WriteStruct(sheetName string, axis string, obj interface{}) error
WriteStruct Writes a struct to row f. a pointer to excelizero object sheetName. sheetName to write to, if sheet not exist, return error axis. where to write from obj. struct need to be written to excel
func (*Excelizero) WriteStructWithTag ¶
func (x *Excelizero) WriteStructWithTag(sheetName string, fromRow int, sl interface{}) error
WriteStructWithTag: write structs to excel rows only insert field that has tag: xlsx sheetName. sheetName to write to, if sheet not exist, return error fromRow. no of row where to start to insert sl. slice of struct that need to be written to excel
func (*Excelizero) WriteStructs ¶
func (x *Excelizero) WriteStructs(sheetName string, axis string, sl interface{}) error
WriteStructs Writes structs to rows f. a pointer to excelizero object sheetName. sheetName to write to, if sheet not exist, return error axis. where to write from sl. slice of struct that need to be written to excel