Documentation ¶
Index ¶
- type Client
- func (client Client) AddSheet(spreadsheetID string, sheetTitle string) error
- func (client Client) ClearSheetValues(spreadsheetID string, sheetTitle string) error
- func (c *Client) CreateNewSpreadsheet(title string) (string, error)
- func (client Client) DeleteSheet(spreadsheetID string, sheetTitle string) error
- func (client *Client) Read(spreadsheetID string, sheetTitle string) ([][]interface{}, error)
- func (client *Client) ReadTable(spreadsheetID string, sheetTitle string) (*Table, error)
- func (client Client) RecreateSheet(spreadsheetID string, sheetTitle string) error
- func (client Client) UpdateSheetGridLimits(spreadsheetID string, sheetTitle string, rows int, columns int) error
- func (client Client) Write(spreadsheetID string, sheetTitle string, values [][]interface{}) error
- func (client Client) WriteTable(spreadsheetID string, sheetTitle string, table *Table) error
- type Table
- func (t *Table) AppendTableAtBottom(a *Table) *Table
- func (t *Table) AppendTableAtRight(a *Table) *Table
- func (t *Table) ClearValues() error
- func (t *Table) ClearValuesInRange(rowStart, colStart, numRows, numCols int) error
- func (t *Table) GetCols() int
- func (t *Table) GetInt64Value(row int, col int) int64
- func (t *Table) GetIntValue(row int, col int) int
- func (t *Table) GetRows() int
- func (t *Table) GetStringValue(row int, col int) string
- func (t *Table) GetValue(row int, col int) interface{}
- func (t *Table) GetValuesAtRow(row int) []interface{}
- func (t *Table) IndexOfRowWithPrefix(values ...interface{}) int
- func (t *Table) InsertColAtIndex(index int) error
- func (t *Table) PutCommaSeparatedInt64(row int, col int, value int64)
- func (t *Table) PutValue(row int, col int, value interface{})
- func (t *Table) PutValuesAtRow(row int, values ...interface{})
- func (t *Table) RemoveColAtIndex(index int) error
- func (t *Table) SetBackgroundColor(row int, col int, c color.Color)
- func (t *Table) SetNumberFormatPattern(row int, col int, pattern string)
- func (t *Table) SetNumberFormatType(row int, col int, formatType string)
- func (t Table) String() string
- func (t *Table) SubTable(rowStart, colStart, numRows, numCols int) (*Table, error)
- func (t *Table) SubTableByFilteringRows(f func(values []interface{}) bool) *Table
- func (t *Table) ToCSV(w io.Writer) error
- func (t *Table) ToMap() map[string]interface{}
- func (t *Table) Values() [][]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to manipulate spreadsheets.
func NewClient ¶
func NewClient(option option.ClientOption) (*Client, error)
NewClient returns a new instance
func (Client) ClearSheetValues ¶
ClearSheetValues clears values of sheet.
func (*Client) CreateNewSpreadsheet ¶
CreateNewSpreadsheet creates new spreadsheet
func (Client) DeleteSheet ¶
DeleteSheet deletes a sheet with title.
func (Client) RecreateSheet ¶
RecreateSheet deletes a sheet with title and adds new one.
func (Client) UpdateSheetGridLimits ¶
func (client Client) UpdateSheetGridLimits(spreadsheetID string, sheetTitle string, rows int, columns int) error
UpdateSheetGridLimits updates grid limits of sheet.
type Table ¶
type Table struct { FrozenRowCount int64 FrozenColumnCount int64 // contains filtered or unexported fields }
Table represents 2 dimension cells.
func (*Table) AppendTableAtBottom ¶
AppendTableAtBottom returns new instance of table appending another table.
func (*Table) AppendTableAtRight ¶
AppendTableAtRight returns new instance of table appending another table to the right.
func (*Table) ClearValues ¶
ClearValues clears all values of table.
func (*Table) ClearValuesInRange ¶
ClearValuesInRange clears the value of a cell in the specified range.
func (*Table) GetInt64Value ¶
GetInt64Value returns value of cell as int.
func (*Table) GetIntValue ¶
GetIntValue returns value of cell as int.
func (*Table) GetStringValue ¶
GetStringValue returns value of cell as string.
func (*Table) GetValuesAtRow ¶
GetValuesAtRow returns a slice containing value of cells at row
func (*Table) IndexOfRowWithPrefix ¶
IndexOfRowWithPrefix returns index of row which contains values as prefix. Returns -1 when there is no row matches.
func (*Table) InsertColAtIndex ¶
InsertColAtIndex inserts new column at index
func (*Table) PutCommaSeparatedInt64 ¶
PutCommaSeparatedInt64 set value of cell at (row, col) as comma separated integer.
func (*Table) PutValuesAtRow ¶
PutValuesAtRow sets values of cells at row
func (*Table) RemoveColAtIndex ¶
RemoveColAtIndex removes column at index
func (*Table) SetBackgroundColor ¶
SetBackgroundColor sets background color of cell at (row, col)
func (*Table) SetNumberFormatPattern ¶
SetNumberFormatPattern sets number format pettern of cell at (row, col)
func (*Table) SetNumberFormatType ¶
SetNumberFormatType sets number format type of cell at (row, col)
func (*Table) SubTable ¶
SubTable returns new instance of table with sliced cells copied from original table
func (*Table) SubTableByFilteringRows ¶
SubTableByFilteringRows returns new instance of table with filtered rows from original table.