excel

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDataMustBeSlice indicates exported data must be a slice.
	ErrDataMustBeSlice = errors.New("data must be a slice")
	// ErrSheetIndexOutOfRange indicates sheet index out of range.
	ErrSheetIndexOutOfRange = errors.New("sheet index out of range")
	// ErrNoDataRowsFound indicates there are no data rows after skips.
	ErrNoDataRowsFound = errors.New("no data rows found")
	// ErrDuplicateColumnName indicates duplicate header column name.
	ErrDuplicateColumnName = errors.New("duplicate column name")
	// ErrFieldNotSettable indicates struct field is not settable during import.
	ErrFieldNotSettable = errors.New("field is not settable")
)

Functions

func NewExporter

func NewExporter(typ reflect.Type, opts ...ExportOption) tabular.Exporter

NewExporter creates a new Exporter with the specified type.

func NewExporterFor

func NewExporterFor[T any](opts ...ExportOption) tabular.Exporter

NewExporterFor creates a new Exporter with the specified type T.

func NewImporter

func NewImporter(typ reflect.Type, opts ...ImportOption) tabular.Importer

NewImporter creates a new Importer with the specified type.

func NewImporterFor

func NewImporterFor[T any](opts ...ImportOption) tabular.Importer

NewImporterFor creates a new Importer with the specified type T.

Types

type ExportOption

type ExportOption func(*exportOptions)

ExportOption is a function that configures ExportOptions.

func WithSheetName

func WithSheetName(name string) ExportOption

type ImportOption

type ImportOption func(*importOptions)

ImportOption is a function that configures ImportOptions.

func WithImportSheetIndex

func WithImportSheetIndex(index int) ImportOption

func WithImportSheetName

func WithImportSheetName(name string) ImportOption

func WithSkipRows

func WithSkipRows(rows int) ImportOption

Jump to

Keyboard shortcuts

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