xlsx

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTableNameMatchSheetName = errors.New("table name must match excel sheet name.")
View Source
var ReadBufSize = 256 * 1024

Functions

func UnmarshalFromXLSX

func UnmarshalFromXLSX(path string) ([][][]string, error)

Types

type XLSXFileInfo

type XLSXFileInfo struct {
	SheetName string
}

func NewXLSXInfo

func NewXLSXInfo(sheetName string) *XLSXFileInfo

type XLSXReader

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

func OpenXLSXReader

func OpenXLSXReader(ctx context.Context, vrw types.ValueReadWriter, path string, fs filesys.ReadableFS, info *XLSXFileInfo) (*XLSXReader, error)

func OpenXLSXReaderFromBinary

func OpenXLSXReaderFromBinary(ctx context.Context, vrw types.ValueReadWriter, r io.ReadCloser, info *XLSXFileInfo) (*XLSXReader, error)

func (*XLSXReader) Close

func (xlsxr *XLSXReader) Close(ctx context.Context) error

Close should release resources being held

func (*XLSXReader) GetSchema

func (xlsxr *XLSXReader) GetSchema() schema.Schema

GetSchema gets the schema of the rows that this reader will return

func (*XLSXReader) ReadRow

func (xlsxr *XLSXReader) ReadRow(ctx context.Context) (row.Row, error)

func (*XLSXReader) ReadSqlRow

func (xlsxr *XLSXReader) ReadSqlRow(ctx context.Context) (sql.Row, error)

func (*XLSXReader) VerifySchema

func (xlsxr *XLSXReader) VerifySchema(outSch schema.Schema) (bool, error)

VerifySchema checks that the incoming schema matches the schema from the existing table

Jump to

Keyboard shortcuts

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