spreadsheet

package module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EncName = "utf-8"
View Source
var ErrTooManyRows = errors.New("too many rows")

Functions

func GetEncoding added in v0.1.0

func GetEncoding(encName string) (encoding.Encoding, error)

func OpenCsv added in v0.1.0

func OpenCsv(fn, encName string) (csvReadCloser, error)

Types

type Column

type Column struct {
	Name           string
	Header, Column Style
}

Column contains the Name of the column and header's style and column's style.

type Number added in v0.1.7

type Number string

Number is a string that contains a number.

type Sheet

type Sheet interface {
	io.Closer
	AppendRow(values ...interface{}) error
}

Sheet should be Closed when finished.

type Style

type Style struct {
	// Format is the number format
	Format string
	// FontBold is true if the font is bold
	FontBold bool
}

Style is a style for a column/row/cell.

type Writer

type Writer interface {
	io.Closer
	NewSheet(name string, cols []Column) (Sheet, error)
}

Writer writes the spreadsheet consisting of the sheets created with NewSheet. The write finishes when Close is called.

The writer SHOULD allow writing to separate sheets concurrently, and document if it does not provide this functionality.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL