Documentation
¶
Index ¶
- Constants
- func ColumnIndexToName(id int) string
- func ColumnNameToIndex(name string) int
- type Cell
- type CellWalker
- func (c *CellWalker) Above() *CellWalker
- func (c *CellWalker) Below() *CellWalker
- func (c *CellWalker) BottomMost() *CellWalker
- func (c *CellWalker) CanMoveDown() bool
- func (c *CellWalker) CanMoveLeft() bool
- func (c *CellWalker) CanMoveRight() bool
- func (c *CellWalker) CanMoveUp() bool
- func (c *CellWalker) Clone() *CellWalker
- func (c *CellWalker) Column(colName string) *CellWalker
- func (c *CellWalker) ColumnIndex() int
- func (c *CellWalker) ColumnName() string
- func (c *CellWalker) ColumnOffset(offset int) *CellWalker
- func (c *CellWalker) IsAtBottomBoundary() bool
- func (c *CellWalker) IsAtLeftBoundary() bool
- func (c *CellWalker) IsAtRightBoundary() bool
- func (c *CellWalker) IsAtTopBoundary() bool
- func (c *CellWalker) Left() *CellWalker
- func (c *CellWalker) LeftMost() *CellWalker
- func (c *CellWalker) Right() *CellWalker
- func (c *CellWalker) RightMost() *CellWalker
- func (c *CellWalker) Row(row int) *CellWalker
- func (c *CellWalker) RowIndex() int
- func (c *CellWalker) RowOffset(offset int) *CellWalker
- func (c *CellWalker) String() string
- func (c *CellWalker) TopMost() *CellWalker
- func (c *CellWalker) Tour() *CellWalker
- type Range
Constants ¶
const ( RowsLimit = 1048576 ColumnsLimit = 16384 )
Variables ¶
This section is empty.
Functions ¶
func ColumnIndexToName ¶
ColumnIndexToName converts column index to default excel name
func ColumnNameToIndex ¶
ColumnNameToIndex converts default excel column name to index, 1-based index name must be uppercase start from A, B, C, ..., Z, AA, AB, ... ZZ, AAA, ..., ZZZ, ...
Types ¶
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
Cell represents a cell in Excel
type CellWalker ¶
type CellWalker struct {
// contains filtered or unexported fields
}
CellWalker struct
func At ¶
func At(cellID string) *CellWalker
At initializes CellWalker by specify initial cell to start
func (*CellWalker) BottomMost ¶ added in v1.2.0
func (c *CellWalker) BottomMost() *CellWalker
Bottommost to move bottommost column
func (*CellWalker) CanMoveDown ¶
func (c *CellWalker) CanMoveDown() bool
CanMoveDown determines if it is at the bottom most cell
func (*CellWalker) CanMoveLeft ¶
func (c *CellWalker) CanMoveLeft() bool
CanMoveLeft determines if it is at the left most cell
func (*CellWalker) CanMoveRight ¶
func (c *CellWalker) CanMoveRight() bool
CanMoveRight determines if it is at the right most cell
func (*CellWalker) CanMoveUp ¶
func (c *CellWalker) CanMoveUp() bool
CanMoveUp determines if it is at the up most cell
func (*CellWalker) Clone ¶
func (c *CellWalker) Clone() *CellWalker
Clone creates a clone of cellwalker
func (*CellWalker) Column ¶
func (c *CellWalker) Column(colName string) *CellWalker
Column jumps to a given colName
func (*CellWalker) ColumnIndex ¶ added in v1.1.2
func (c *CellWalker) ColumnIndex() int
ColumnIndex returns the current column number
func (*CellWalker) ColumnName ¶ added in v1.1.2
func (c *CellWalker) ColumnName() string
ColumnName returns the current column name
func (*CellWalker) ColumnOffset ¶
func (c *CellWalker) ColumnOffset(offset int) *CellWalker
ColumnOffset returns a cell with a given offset distance to column
func (*CellWalker) IsAtBottomBoundary ¶ added in v1.1.1
func (c *CellWalker) IsAtBottomBoundary() bool
IsAtBottomBoundary determine if current position is at the bottom of range
func (*CellWalker) IsAtLeftBoundary ¶ added in v1.1.1
func (c *CellWalker) IsAtLeftBoundary() bool
IsAtLeftBoundary determine if current position is at the left of range
func (*CellWalker) IsAtRightBoundary ¶ added in v1.1.1
func (c *CellWalker) IsAtRightBoundary() bool
IsAtRightBoundary determine if current position is at the right of range
func (*CellWalker) IsAtTopBoundary ¶ added in v1.1.1
func (c *CellWalker) IsAtTopBoundary() bool
IsAtTopBoundary determine if current position is at the top of range
func (*CellWalker) LeftMost ¶
func (c *CellWalker) LeftMost() *CellWalker
LeftMost to move leftmost column
func (*CellWalker) RightMost ¶ added in v1.2.0
func (c *CellWalker) RightMost() *CellWalker
Rightmost to move rightmost column
func (*CellWalker) RowIndex ¶ added in v1.1.2
func (c *CellWalker) RowIndex() int
RowIndex returns the current row number
func (*CellWalker) RowOffset ¶
func (c *CellWalker) RowOffset(offset int) *CellWalker
RowOffset returns a cell with a given offset distance to row
func (*CellWalker) String ¶
func (c *CellWalker) String() string
func (*CellWalker) TopMost ¶
func (c *CellWalker) TopMost() *CellWalker
TopMost to move topmost column
func (*CellWalker) Tour ¶
func (c *CellWalker) Tour() *CellWalker
Tour traverses position to Right column first then first column of next row if hit the boundary edge. Return nil if cannot make a further move
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range is a boundary that cellwalker can move
func (*Range) At ¶
func (r *Range) At(cellID string) *CellWalker
At returns cell walker with range constraint
func (*Range) BottomIndex ¶
BottomIndex returns row index of bottom boundary
func (*Range) RightIndex ¶
RightIndex returns column index of right boundary