xlsx

package
v1.122.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package xlsx provides the ability to extract text from Excel spreadsheets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	Value string
	Type  CellType
}

Cell holds the contents of a cell.

func (*Cell) Boolean

func (c *Cell) Boolean() bool

Boolean returns the value of this cell as a boolean.

func (*Cell) Float

func (c *Cell) Float() float64

Float returns the value of this cell as an float.

func (*Cell) Integer

func (c *Cell) Integer() int

Integer returns the value of this cell as an integer.

func (*Cell) String

func (c *Cell) String() string

func (*Cell) Time

func (c *Cell) Time() time.Time

Time returns the value of this cell as a time.Time.

type CellType

type CellType int

CellType holds an enumeration of cell types.

const (
	String CellType = iota
	Number
	Boolean
)

Cell types.

type Ref

type Ref struct {
	Row int
	Col int
}

Ref holds a cell reference.

func ParseRef

func ParseRef(str string) Ref

ParseRef parses a string into a Ref.

func (Ref) String

func (r Ref) String() string

type Sheet

type Sheet struct {
	Cells map[Ref]Cell
	Name  string
	Min   Ref
	Max   Ref
}

Sheet holds the data contained in a single worksheet.

func Load

func Load(path string) ([]Sheet, error)

Load sheets from an .xlsx file.

func Read added in v1.1.9

func Read(in io.ReaderAt, size int64) ([]Sheet, error)

Read sheets from an .xlsx stream.

Jump to

Keyboard shortcuts

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