excel

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSVToDataTable

func CSVToDataTable(r io.Reader) db.DataTable

func DataTableToCSV

func DataTableToCSV(r io.Writer, dt db.DataTable)

Types

type Cell

type Cell struct {
	Type string `xml:"ss:Type"`
	Data string `xml:"Data"`
}

type Excel

type Excel struct {
	Sheets []Sheet
}

func NewExcel

func NewExcel(sheetName string, dt db.DataTable) *Excel

func XMLToExcel

func XMLToExcel(r io.Reader) *Excel

func (*Excel) AddSheet

func (e *Excel) AddSheet(sheetName string, dt db.DataTable)

func (*Excel) ToString

func (e *Excel) ToString() string

type Row

type Row struct {
	Cell []Cell `xml:"Cell"`
}

type Sheet

type Sheet struct {
	Name  string
	Table db.DataTable
}

type Table

type Table struct {
	ExpandedColumnCount string `xml:"ss:ExpandedColumnCount,attr"`
	ExpandedRowCount    string `xml:"ss:ExpandedRowCount,attr"`
	FullColumns         string `xml:"ss:FullColumns,attr"`
	FullRows            string `xml:"ss:FullRows,attr"`
	DefaultColumnWidth  string `xml:"ss:DefaultColumnWidth,attr"`
	DefaultRowHeight    string `xml:"ss:DefaultRowHeight,attr"`
	Row                 []Row  `xml:"Row"`
}

type Workbook

type Workbook struct {
	Worksheet []Worksheet `xml:"Worksheet"`
}

type Worksheet

type Worksheet struct {
	Name  string `xml:"ss:Name,attr"`
	Table Table  `xml:"Table"`
}

Jump to

Keyboard shortcuts

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