Documentation ¶
Index ¶
- func DecimalToFraction(val float64, nn, nd int) (num, den int)
- func DecimalToWholeFraction(val float64, nn, nd int) (whole, num, den int)
- type Cell
- func (c Cell) Clone() Cell
- func (c Cell) Equal(other Cell) bool
- func (c Cell) FormatNo() uint16
- func (c Cell) Less(other Cell) bool
- func (c *Cell) SetFormatNumber(f uint16)
- func (c *Cell) SetURL(link string)
- func (c Cell) Type() CellType
- func (c Cell) URL() (*url.URL, bool)
- func (c Cell) Value() interface{}
- type CellType
- type FmtFunc
- type Formatter
- type Sheet
- func (s *Sheet) Err() error
- func (s *Sheet) Formats() []string
- func (s *Sheet) IsEmpty() bool
- func (s *Sheet) Next() bool
- func (s *Sheet) Put(row, col int, value interface{}, fmtNum uint16)
- func (s *Sheet) Raw() []Cell
- func (s *Sheet) Resize(rows, cols int)
- func (s *Sheet) Scan(args ...interface{}) error
- func (s *Sheet) Set(row, col int, value interface{})
- func (s *Sheet) SetURL(row, col int, link string)
- func (s *Sheet) Strings() []string
- func (s *Sheet) Types() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecimalToFraction ¶
DecimalToFraction converts a floating point value into a fraction approximation with at most nn digits in the numerator and nd digits in the denominator.
func DecimalToWholeFraction ¶
DecimalToWholeFraction converts a floating point value into a whole number and fraction approximation with at most nn digits in the numerator and nd digits in the denominator.
Types ¶
type Cell ¶
type Cell []interface{}
Cell represents a single cell value.
func NewCell ¶
func NewCell(value interface{}) Cell
NewCell creates a new cell value from any builtin type.
func NewCellWithType ¶
NewCellWithType creates a new cell value with the given type, coercing as necessary.
func (*Cell) SetFormatNumber ¶
SetFormatNumber changes the number format stored with the cell.
type CellType ¶
type CellType uint16
CellType annotates the type of data extracted in the cell.
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter contains formatting methods common to Excel spreadsheets.
func (*Formatter) Apply ¶
Apply the specified number format to the value. Returns false when fmtID is unknown.
func (*Formatter) ConvertToDate ¶
ConvertToDate converts a floating-point value using the Excel date serialization conventions.
type Sheet ¶
Sheet holds raw and rendered values for a spreadsheet.
func (*Sheet) Next ¶
Next advances to the next record of content. It MUST be called prior to any Scan().
func (*Sheet) Resize ¶
Resize the sheet for the number of rows and cols given. Newly added cells default to blank.
func (*Sheet) Scan ¶
Scan extracts values from the current record into the provided arguments Arguments must be pointers to one of 5 supported types:
bool, int64, float64, string, or time.Time
If invalid, returns ErrInvalidScanType
func (*Sheet) Set ¶
Set changes the value in an existing cell location. NB Currently only used for populating string results for formulas.