excel

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Excel

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

Excel excel

func New

func New() *Excel

New create a new excel

func OpenFile

func OpenFile(filename string, opt ...Option) (*Excel, error)

func OpenReader

func OpenReader(r io.Reader, opt ...Option) (*Excel, error)

func (*Excel) GetRows

func (e *Excel) GetRows(index int, options ...ReadOption) ([][]string, bool, error)

GetRows get all rows with row and column limit. Default Row limit is 8192. when exceed will set hasMore=true. Default Column limit is 1000. when exceed will cause ErrTooManyColumn

func (*Excel) Rows

func (e *Excel) Rows(index int) (*excelize.Rows, error)

Rows return rows by sheet index

func (*Excel) Size

func (e *Excel) Size(index int) (row int, column int, err error)

Size returns the row count and max column count of a sheet

type Option added in v1.3.0

type Option = excelize.Options

type ReadConfig

type ReadConfig struct {
	MaxRow    int
	MaxColumn int
}

type ReadOption

type ReadOption func(opt *ReadConfig)

func WithMaxColumn

func WithMaxColumn(maxColumn int) ReadOption

WithMaxColumn set the max column to read when get all rows

func WithMaxRow

func WithMaxRow(maxRow int) ReadOption

WithMaxRow set the max row to read when get all rows

type Size

type Size struct {
	Row    int
	Column int
}

Size record for excel sheet size

Jump to

Keyboard shortcuts

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