googlespreadsheet

package module
v0.0.0-...-da9e42a Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 9 Imported by: 0

README

googlespreadsheet

simple golang framework to import or export arrays to google spreadsheet

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearRange

func ClearRange(googleConf *Config, theRange string) error

ClearRange clears a destination range ( sheetname!A1:B34 )

func ClearSheet

func ClearSheet(googleConf *Config, sourceRange string) error

ClearSheet clear values

func ColAddress

func ColAddress(col int) string

ColAddress returns a column letter (like "A" or "AA") corresponding to an int. if int <=0 or >675 returns ""

func DataArrayToGoogleSpreadSheet

func DataArrayToGoogleSpreadSheet(googleConf *Config, destSheet string, destRow int, destCol int, data [][]interface{}) error

DataArrayToGoogleSpreadSheet transfer a [][]interface{} array to a google spreadsheet

func DataMapToGoogleSpreadsheet

func DataMapToGoogleSpreadsheet(googleConf *Config, sheet string, row int, col int, data []map[string]interface{}) error

DataMapToGoogleSpreadsheet transfer a []map[string]interface{} array to a google spreadsheet

func GoogleSpreadsheetToDataArray

func GoogleSpreadsheetToDataArray(googleConf *Config, sourceRange string) ([][]interface{}, error)

GoogleSpreadsheetToDataArray transfer a google spreadsheet to a [][]interface{} array

Types

type Config

type Config struct {
	GoogleCredentials []byte
	SpreadsheetID     string
	Client            *http.Client
}

Config represents auth and spreadsheet info to access google spreadsheet

Jump to

Keyboard shortcuts

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