Documentation
¶
Index ¶
- type SheetHandler
- func (h SheetHandler) Append(_range string, df *dataframe.DataFrame) error
- func (h SheetHandler) ReadDataFrame(_range string) (*dataframe.DataFrame, error)
- func (h SheetHandler) ReadSeries(_range string) (*series.Series, error)
- func (h SheetHandler) WriteDataFrame(_range string, df *dataframe.DataFrame, clear bool) error
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 ¶
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).