excel

package
v0.3.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExcelExporter

type ExcelExporter struct {
	// contains filtered or unexported fields
}

ExcelExporter Excel 导出器

func ExportToExcel

func ExportToExcel(sheetName string, headers []string, data [][]interface{}) (*ExcelExporter, error)

ExportToExcel 快速导出(泛型辅助函数)

func NewExcelExporter

func NewExcelExporter(sheetName string) *ExcelExporter

NewExcelExporter 创建 Excel 导出器

func (*ExcelExporter) AddRow

func (e *ExcelExporter) AddRow(values []interface{}) error

AddRow 添加数据行

func (*ExcelExporter) Close

func (e *ExcelExporter) Close() error

Close 关闭文件

func (*ExcelExporter) SaveAs

func (e *ExcelExporter) SaveAs(filename string) error

SaveAs 保存为文件

func (*ExcelExporter) SetHeaders

func (e *ExcelExporter) SetHeaders(headers []string) error

SetHeaders 设置表头

func (*ExcelExporter) Write

func (e *ExcelExporter) Write(w io.Writer) error

Write 写入到 Writer

type ExcelImporter

type ExcelImporter struct {
	// contains filtered or unexported fields
}

ExcelImporter Excel 导入器

func NewExcelImporter

func NewExcelImporter(reader io.Reader) (*ExcelImporter, error)

NewExcelImporter 创建 Excel 导入器

func (*ExcelImporter) Close

func (i *ExcelImporter) Close() error

Close 关闭文件

func (*ExcelImporter) GetRows

func (i *ExcelImporter) GetRows() ([][]string, error)

GetRows 获取所有行数据

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL