tblconv

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 6 Imported by: 3

README

tblconv

A simple tool for converting one "table" format into another.

Supported Formats

  • CSV
    • source
    • output
  • Excel
    • source
    • output
  • SQL
    • source
    • output

CLI Features

The tblconv CLI supports all of the above formats. Some peculiarities for each format are the following.

SQL servers
  • Postgres
  • MySQL
  • SQLite
  • IBM DB2

Documentation

Overview

Package tblconv

Index

Constants

This section is empty.

Variables

View Source
var DefaultSheetName = "Sheet1"

DefaultSheetName

Functions

func Copy

func Copy(w Writer, r Reader) error

Copy provides that ability to copy tabulized data from one format to another.

func NewCSVReader

func NewCSVReader(r io.Reader) *csv.Reader

NewCSVReader

Types

type CSVWriter

type CSVWriter struct {
	CSV *csv.Writer
}

CSVWriter

func NewCSVWriter

func NewCSVWriter(w io.Writer) *CSVWriter

NewCSVWriter

func (*CSVWriter) Flush

func (w *CSVWriter) Flush() error

Flush

func (*CSVWriter) Write

func (w *CSVWriter) Write(record []string) error

Write

type ExcelOption

type ExcelOption func(*excelConfig)

ExcelOption

func SheetName

func SheetName(sheet string) ExcelOption

SheetName

type ExcelReader

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

ExcelReader

func NewExcelReader

func NewExcelReader(r io.Reader, opts ...ExcelOption) *ExcelReader

NewExcelReader

func (*ExcelReader) Read

func (r *ExcelReader) Read() ([]string, error)

Read

type ExcelWriter

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

ExcelWriter

func NewExcelWriter

func NewExcelWriter(w io.Writer, opts ...ExcelOption) *ExcelWriter

NewExcelWriter

func (*ExcelWriter) Flush

func (w *ExcelWriter) Flush() (err error)

Flush

func (*ExcelWriter) Write

func (w *ExcelWriter) Write(record []string) error

Write

type Reader

type Reader interface {
	Read() ([]string, error)
}

Reader

type Writer

type Writer interface {
	Write(record []string) error
	Flush() error
}

Writer

Directories

Path Synopsis
cmd
tblconv Module

Jump to

Keyboard shortcuts

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