xlsx

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

README

xlsx-tools

modes

  • one2many - 1 csv for every xlsx sheet
  • one2one - 1 csv for all xlsx sheets

examples

$ xlsxcli -mode one2many -mapping mapping.csv input.xlsx

storage

key-value key - tupple of strings

access modes

  • key - value
  • key - table

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XlsxFile

type XlsxFile struct {
	Name string
	// contains filtered or unexported fields
}

func Open

func Open(name string, input *xlsx.File) (*XlsxFile, error)

func (*XlsxFile) AddSheet

func (x *XlsxFile) AddSheet(idx int, name string) *XlsxSheet

func (*XlsxFile) Sheet

func (x *XlsxFile) Sheet(name string) *XlsxSheet

func (*XlsxFile) Sheets

func (x *XlsxFile) Sheets() <-chan *XlsxSheet

func (*XlsxFile) String

func (x *XlsxFile) String() string

type XlsxRow

type XlsxRow struct {

	// (col) = value
	Data map[int]string
	// contains filtered or unexported fields
}

type XlsxSheet

type XlsxSheet struct {
	Name string

	// (row, col) = value
	Data      map[int]map[int]string
	MaxRow    int
	MaxColumn int
	// contains filtered or unexported fields
}

func (*XlsxSheet) Headers

func (s *XlsxSheet) Headers() []string

func (*XlsxSheet) Rows

func (s *XlsxSheet) Rows() <-chan *map[string]string

func (*XlsxSheet) Set

func (s *XlsxSheet) Set(x int, y int, value string)

func (*XlsxSheet) String

func (s *XlsxSheet) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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