excel

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 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 Cell

type Cell struct {
	Row Row
	Col Col

} // 单元格

type Col

type Col string // 列

func (Col) ToString

func (c Col) ToString() string

type Read

type Read struct {
	Lu    Cell   // 左上单元格坐标
	Rd    Cell   // 右下单元格坐标
	Sheet string // 工作表名称
	// contains filtered or unexported fields
}

func NewRead

func NewRead(opts ...ReadOption) *Read

func (*Read) Print added in v0.6.1

func (r *Read) Print()

Print 打印

func (*Read) Read

func (r *Read) Read() ([][]string, error)

Read 读取excel文件

type ReadOption

type ReadOption func(*Read)

func WithFile

func WithFile(file string) ReadOption

func WithLu

func WithLu(lu Cell) ReadOption

func WithRd

func WithRd(rd Cell) ReadOption

func WithSheet

func WithSheet(sheet string) ReadOption

type Row

type Row int // 行

func (Row) ToInt

func (r Row) ToInt() int

type Write added in v0.9.4

type Write struct {
	Filepath string     // 文件路径
	Sheet    string     // 工作表名称
	Head     []string   // 表头
	Data     [][]string // 数据
}

func NewWrite added in v0.9.4

func NewWrite(opts ...WriteOption) *Write

func (*Write) Write added in v0.9.4

func (w *Write) Write() (string, error)

type WriteOption added in v0.9.4

type WriteOption func(*Write)

func WithData added in v0.9.4

func WithData(data [][]string) WriteOption

func WithFilepath added in v0.9.4

func WithFilepath(filepath string) WriteOption

func WithHead added in v0.9.4

func WithHead(head []string) WriteOption

func WithWriteSheet added in v0.9.4

func WithWriteSheet(sheet string) WriteOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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