reference

package
v0.0.0-...-3f4e482 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnToIndex

func ColumnToIndex(col string) uint32

ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)

func IndexToColumn

func IndexToColumn(col uint32) string

IndexToColumn maps a column number to a coumn name (e.g. 0 = A, 1 = B, 26 = AA)

Types

type CellReference

type CellReference struct {
	RowIdx         uint32
	ColumnIdx      uint32
	Column         string
	AbsoluteColumn bool
	AbsoluteRow    bool
}

CellReference is a parsed reference to a cell. Input is of the form 'A1', '$C$2', etc.

func ParseCellReference

func ParseCellReference(s string) (CellReference, error)

ParseCellReference parses a cell reference of the form 'A10' and splits it into column/row segments.

func ParseRangeReference

func ParseRangeReference(s string) (from, to CellReference, err error)

ParseRangeReference splits a range reference of the form "A1:B5" into its components.

func (CellReference) String

func (c CellReference) String() string

Jump to

Keyboard shortcuts

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