Documentation
¶
Overview ¶
Package xlsx implements a simple xlsx library.
Index ¶
- Variables
- func Register(charset string, decoder func(io.Reader) io.Reader)
- type Book
- type Cell
- func (c *Cell) Bool() bool
- func (c *Cell) Float() float64
- func (c *Cell) Int() int
- func (c *Cell) IsBlank() bool
- func (c *Cell) SetBool(v bool)
- func (c *Cell) SetFloat(v float64)
- func (c *Cell) SetInt(v int)
- func (c *Cell) SetString(v string)
- func (c *Cell) SetTime(v time.Time)
- func (c *Cell) String() string
- func (c *Cell) Time() time.Time
- type Record
- type RecordsBuilder
- func (rb *RecordsBuilder) Build() linq.Seq[Record]
- func (rb *RecordsBuilder) Head(option int) *RecordsBuilder
- func (rb *RecordsBuilder) SkipBlank(option bool) *RecordsBuilder
- func (rb *RecordsBuilder) SkipBottom(option int) *RecordsBuilder
- func (rb *RecordsBuilder) SkipLeft(option int) *RecordsBuilder
- func (rb *RecordsBuilder) SkipRight(option int) *RecordsBuilder
- func (rb *RecordsBuilder) SkipTop(option int) *RecordsBuilder
- type Row
- type Sheet
- type Template
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknownCharset = internal.ErrUnknownCharset ErrInvalidFile = internal.ErrInvalidFile ErrInvalidTemplate = internal.ErrInvalidTemplate ErrInvalidQueryOption = errors.New("xlsx: invalid query option") )
Errors.
Functions ¶
Types ¶
type Book ¶
Book represents a workbook.
func (*Book) DumpWriter ¶
DumpWriter dumps the book to io.Writer.
type Cell ¶
Cell represents a cell.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record represents a record.
type RecordsBuilder ¶ added in v0.4.0
type RecordsBuilder struct {
// contains filtered or unexported fields
}
RecordsBuilder represents the records builder.
func (*RecordsBuilder) Build ¶ added in v0.4.0
func (rb *RecordsBuilder) Build() linq.Seq[Record]
Build builds the records.
func (*RecordsBuilder) Head ¶ added in v0.4.0
func (rb *RecordsBuilder) Head(option int) *RecordsBuilder
Head marks the number of rows for head. Default is 1.
func (*RecordsBuilder) SkipBlank ¶ added in v0.4.0
func (rb *RecordsBuilder) SkipBlank(option bool) *RecordsBuilder
SkipBlank marks whether to skip blank rows. Default is true.
func (*RecordsBuilder) SkipBottom ¶ added in v0.4.0
func (rb *RecordsBuilder) SkipBottom(option int) *RecordsBuilder
SkipBottom marks the number of rows skipped at the bottom. Default is 0.
func (*RecordsBuilder) SkipLeft ¶ added in v0.4.0
func (rb *RecordsBuilder) SkipLeft(option int) *RecordsBuilder
SkipLeft marks the number of rows skipped at the left. Default is 0.
func (*RecordsBuilder) SkipRight ¶ added in v0.4.0
func (rb *RecordsBuilder) SkipRight(option int) *RecordsBuilder
SkipRight marks the number of rows skipped at the right. Default is 0.
func (*RecordsBuilder) SkipTop ¶ added in v0.4.0
func (rb *RecordsBuilder) SkipTop(option int) *RecordsBuilder
SkipTop marks the number of rows skipped at the top. Default is 0.
type Row ¶
Row represents a row.
func (*Row) Cell ¶
Cell returns the cell by reference. The returned cell is guaranteed not to be nil.
type Sheet ¶
Sheet represents a worksheet.
func (*Sheet) Cell ¶
Cell returns the cell by reference. The returned cell is guaranteed not to be nil.
func (*Sheet) ICell ¶
ICell returns the cell by index. The returned cell is guaranteed not to be nil.
func (*Sheet) RecordsBuilder ¶ added in v0.4.0
func (s *Sheet) RecordsBuilder() *RecordsBuilder
Query queries the records. If options is nil, use the default options.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template is the representation of a parsed template. It is goroutine safe.
func ParseBytes ¶
ParseBytes creates a new Template and parses the template definitions from the bytes.
func ParseFile ¶
ParseFiles creates a new Template and parses the template definitions from the named file.
func ParseReader ¶
ParseReader creates a new Template and parses the template definitions from the Reader.
func (*Template) ExecuteBytes ¶
ExecuteBytes applies a parsed template to the specified data object, and writes the output to the bytes.
func (*Template) ExecuteFile ¶
ExecuteFile applies a parsed template to the specified data object, and writes the output to the named file.