xlsx

package
v0.0.0-...-883d5d7 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 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 {
	Type  CellType
	Value string
}

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 {
	Name  string
	Min   Ref
	Max   Ref
	Cells map[Ref]Cell
}

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

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