...
Documentation
Documentation

# Package reference

## Overview ▹

## Overview ▾

## Index ▹

## Index ▾

### Package files

cellreference.go columnreference.go parse.go rangereference.go

## 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 column name (e.g. 0 = A, 1 = B, 26 = AA)

## type CellReference ¶

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

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

### 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

String returns a string representation of CellReference.

### func (*CellReference) Update ¶

    func (ref *CellReference) Update(updateType update.UpdateAction) *CellReference

Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.

## type ColumnReference ¶

ColumnReference is a parsed reference to a column. Input is of the form 'A', '$C', etc.

    type ColumnReference struct {
        ColumnIdx      uint32
        Column         string
        AbsoluteColumn bool
        SheetName      string
    }

### func ParseColumnRangeReference ¶

    func ParseColumnRangeReference(s string) (from, to ColumnReference, err error)

ParseColumnRangeReference splits a range reference of the form "A:B" into its components.

### func ParseColumnReference ¶

    func ParseColumnReference(s string) (ColumnReference, error)

ParseColumnReference parses a column reference of the form 'Sheet1!A' and splits it into sheet name and column segments.

### func (ColumnReference) String ¶

    func (c ColumnReference) String() string

String returns a string representation of ColumnReference.

### func (*ColumnReference) Update ¶

    func (ref *ColumnReference) Update(updateType update.UpdateAction) *ColumnReference

Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.