google

package
v0.0.0-...-56d51e0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SheetHandler

type SheetHandler struct {
	Service       *sheets.Service
	SpreadsheetID string
	HeaderRows    int
	IndexCols     int
}

SheetHandler writes to/reads from a Google Sheets workbook using a Service object.

Most Sheet methods take a _range, which is a Sheets range in A1 notation (e.g., "Sheet1!A1:C5" or "Sheet1!A:A"). A sheet name by itself (e.g., "Sheet1") is valid A1 notation and refers to all the data in that Sheet.

func (SheetHandler) Append

func (h SheetHandler) Append(_range string, df *dataframe.DataFrame) error

Append appends the last row of a DataFrame as the next row in a range.

func (SheetHandler) ReadDataFrame

func (h SheetHandler) ReadDataFrame(_range string) (*dataframe.DataFrame, error)

ReadDataFrame converts data in the range into a DataFrame.

func (SheetHandler) ReadSeries

func (h SheetHandler) ReadSeries(_range string) (*series.Series, error)

ReadSeries converts the first column in the range into a Series.

func (SheetHandler) WriteDataFrame

func (h SheetHandler) WriteDataFrame(_range string, df *dataframe.DataFrame, clear bool) error

WriteDataFrame writes a DataFrame into a Sheet beginning at the specified range. If clear is true, the entire sheet is cleared first (i.e., the sheet is overwritten completely).

Jump to

Keyboard shortcuts

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