unioffice: github.com/unidoc/unioffice/spreadsheet/reference Index | Files

package reference

import "github.com/unidoc/unioffice/spreadsheet/reference"


Package Files

cellreference.go parse.go rangereference.go

func ColumnToIndex Uses

func ColumnToIndex(col string) uint32

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

func IndexToColumn Uses

func IndexToColumn(col uint32) string

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

type CellReference Uses

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 Uses

func ParseCellReference(s string) (CellReference, error)

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

func ParseRangeReference Uses

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 Uses

func (c CellReference) String() string

Package reference imports 4 packages (graph) and is imported by 8 packages. Updated 2019-08-02. Refresh now. Tools for package owners.