exchange: github.com/qor/exchange/backends/excel Index | Files

package excel

import "github.com/qor/exchange/backends/excel"

Index

Package Files

excel.go reader.go writer.go

type Config Uses

type Config struct {
    TrimSpace bool
    SheetName string
}

Config excel config

type Excel Uses

type Excel struct {
    // contains filtered or unexported fields
}

Excel excel struct

func New Uses

func New(value interface{}, config ...*Config) *Excel

New new excel backend

func (*Excel) NewReader Uses

func (excel *Excel) NewReader(res *exchange.Resource, context *qor.Context) (exchange.Rows, error)

NewReader new csv reader

func (*Excel) NewWriter Uses

func (excel *Excel) NewWriter(res *exchange.Resource, context *qor.Context) (exchange.Writer, error)

NewWriter new csv writer

type Rows Uses

type Rows struct {
    *Excel
    Resource *exchange.Resource
    // contains filtered or unexported fields
}

Rows CSV rows struct

func (Rows) Header Uses

func (rows Rows) Header() (results []string)

Header CSV header column

func (*Rows) Next Uses

func (rows *Rows) Next() bool

Next read next rows from CSV

func (Rows) ReadRow Uses

func (rows Rows) ReadRow() (*resource.MetaValues, error)

ReadRow read row from CSV

func (*Rows) Total Uses

func (rows *Rows) Total() uint

Total CSV total rows

type Writer Uses

type Writer struct {
    *Excel

    Resource *exchange.Resource
    Writer   *excelize.File
    // contains filtered or unexported fields
}

Writer CSV writer struct

func (*Writer) Flush Uses

func (writer *Writer) Flush() error

Flush flush all changes

func (*Writer) WriteHeader Uses

func (writer *Writer) WriteHeader() error

WriteHeader write header

func (*Writer) WriteRow Uses

func (writer *Writer) WriteRow(record interface{}) (*resource.MetaValues, error)

WriteRow write row

Package excel imports 11 packages (graph). Updated 2019-05-06. Refresh now. Tools for package owners.