Documentation
¶
Overview ¶
Package xls reads binary XLS files.
Index ¶
- Variables
- type BlankCol
- type CellRange
- type CellValue
- type Col
- type Font
- type FontInfo
- type Format
- type FormulaCol
- type FormulaStringCol
- type HyperLink
- type LabelsstCol
- type MulBlankCol
- type MulrkCol
- type NumberCol
- type RK
- type Ranger
- type RkCol
- type Row
- type TWorkSheetVisibility
- type WorkBook
- type WorkSheet
- type XF
- type XfRk
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsInt = fmt.Errorf("is int")
Functions ¶
This section is empty.
Types ¶
type FormulaCol ¶
type FormulaCol struct { Header struct { Col IndexXf uint16 Result [8]byte Flags uint16 // contains filtered or unexported fields } Bts []byte }
func (*FormulaCol) String ¶
func (c *FormulaCol) String(wb *WorkBook) []string
func (*FormulaCol) Value ¶
func (c *FormulaCol) Value(wb *WorkBook) CellValue
type FormulaStringCol ¶
func (*FormulaStringCol) String ¶
func (c *FormulaStringCol) String(wb *WorkBook) []string
func (*FormulaStringCol) Value ¶
func (c *FormulaStringCol) Value(wb *WorkBook) CellValue
type HyperLink ¶
type HyperLink struct { CellRange Description string TextMark string TargetFrame string URL string ShortedFilePath string ExtendedFilePath string IsURL bool }
HyperLink of a link.
type LabelsstCol ¶
func (*LabelsstCol) String ¶
func (c *LabelsstCol) String(wb *WorkBook) []string
func (*LabelsstCol) Value ¶
func (c *LabelsstCol) Value(wb *WorkBook) CellValue
type MulBlankCol ¶
func (*MulBlankCol) LastCol ¶
func (c *MulBlankCol) LastCol() uint16
func (*MulBlankCol) String ¶
func (c *MulBlankCol) String(wb *WorkBook) []string
func (*MulBlankCol) Value ¶
func (c *MulBlankCol) Value(wb *WorkBook) CellValue
type Row ¶
type Row struct { Cols map[uint16]contentHandler // contains filtered or unexported fields }
Row handle.
func (*Row) Col ¶
Col gets the n'th column (zero-based). If not found it will return empty string. Merged cells will be reported more then once if iterating.
type TWorkSheetVisibility ¶
type TWorkSheetVisibility byte
const ( WorkSheetVisible TWorkSheetVisibility = 0 WorkSheetHidden TWorkSheetVisibility = 1 WorkSheetVeryHidden TWorkSheetVisibility = 2 )
type WorkBook ¶
type WorkBook struct { Is5ver bool Type uint16 Codepage uint16 XF []XF Fonts []Font Formats map[uint16]*Format Author string // contains filtered or unexported fields }
WorkBook is the parsed XLS file.
func Open ¶
Open a XLS file from disk with the given charset.
Example ¶
xlFile, err := Open(filepath.Join("testdata", "table.xls"), "utf-8") if err != nil { log.Fatal(err) } defer xlFile.Close() fmt.Println(xlFile.Author)
Output:
func OpenReader ¶
func OpenReader(r io.ReadSeeker, charset string) (*WorkBook, error)
OpenReader opens an XLS file from r with charset. Charset may be "utf-8". If r is a closer, r.Close will be called when WorkBook.Close is called.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.