sheets

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sheets is the Sheets v4 JSON the vfs adapter reads and writes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchUpdateSpreadsheetRequest

type BatchUpdateSpreadsheetRequest struct {
	Requests []*Request `json:"requests,omitempty"`
}

BatchUpdateSpreadsheetRequest is spreadsheets.batchUpdate.

type BatchUpdateValuesRequest

type BatchUpdateValuesRequest struct {
	ValueInputOption string        `json:"valueInputOption,omitempty"`
	Data             []*ValueRange `json:"data,omitempty"`
}

BatchUpdateValuesRequest is spreadsheets.values.batchUpdate.

type Border

type Border struct {
	Style      string      `json:"style,omitempty"`
	Color      *Color      `json:"color,omitempty"`
	ColorStyle *ColorStyle `json:"colorStyle,omitempty"`
}

Border is one edge.

type Borders

type Borders struct {
	Top    *Border `json:"top,omitempty"`
	Bottom *Border `json:"bottom,omitempty"`
	Left   *Border `json:"left,omitempty"`
	Right  *Border `json:"right,omitempty"`
}

Borders are a cell's four edges.

type CellData

type CellData struct {
	UserEnteredValue  *ExtendedValue `json:"userEnteredValue,omitempty"`
	FormattedValue    string         `json:"formattedValue,omitempty"`
	UserEnteredFormat *CellFormat    `json:"userEnteredFormat,omitempty"`
}

CellData is one cell: what the user entered, how it shows, its format.

type CellFormat

type CellFormat struct {
	NumberFormat         *NumberFormat `json:"numberFormat,omitempty"`
	TextFormat           *TextFormat   `json:"textFormat,omitempty"`
	BackgroundColor      *Color        `json:"backgroundColor,omitempty"`
	BackgroundColorStyle *ColorStyle   `json:"backgroundColorStyle,omitempty"`
	HorizontalAlignment  string        `json:"horizontalAlignment,omitempty"`
	VerticalAlignment    string        `json:"verticalAlignment,omitempty"`
	WrapStrategy         string        `json:"wrapStrategy,omitempty"`
	Borders              *Borders      `json:"borders,omitempty"`
}

CellFormat is a cell's format.

type Color

type Color struct {
	Red   float64 `json:"red,omitempty"`
	Green float64 `json:"green,omitempty"`
	Blue  float64 `json:"blue,omitempty"`
}

Color is an RGB color with channels from 0 to 1.

type ColorStyle

type ColorStyle struct {
	RGBColor *Color `json:"rgbColor,omitempty"`
}

ColorStyle is a color; an empty one clears it.

type ExtendedValue

type ExtendedValue struct {
	FormulaValue *string  `json:"formulaValue,omitempty"`
	StringValue  *string  `json:"stringValue,omitempty"`
	NumberValue  *float64 `json:"numberValue,omitempty"`
	BoolValue    *bool    `json:"boolValue,omitempty"`
}

ExtendedValue is a cell input; one field is set.

type GridData

type GridData struct {
	StartRow    int64      `json:"startRow,omitempty"`
	StartColumn int64      `json:"startColumn,omitempty"`
	RowData     []*RowData `json:"rowData,omitempty"`
}

GridData is cells from a start row and column.

type GridRange

type GridRange struct {
	SheetID          int64 `json:"sheetId,omitempty"`
	StartRowIndex    int64 `json:"startRowIndex,omitempty"`
	EndRowIndex      int64 `json:"endRowIndex,omitempty"`
	StartColumnIndex int64 `json:"startColumnIndex,omitempty"`
	EndColumnIndex   int64 `json:"endColumnIndex,omitempty"`
}

GridRange is a half-open block of cells on a sheet.

type NamedRange

type NamedRange struct {
	Name  string     `json:"name,omitempty"`
	Range *GridRange `json:"range,omitempty"`
}

NamedRange is a named block of cells.

type NumberFormat

type NumberFormat struct {
	Type    string `json:"type,omitempty"`
	Pattern string `json:"pattern,omitempty"`
}

NumberFormat is a number pattern and its type.

type RepeatCellRequest

type RepeatCellRequest struct {
	Range  *GridRange `json:"range,omitempty"`
	Cell   *CellData  `json:"cell,omitempty"`
	Fields string     `json:"fields,omitempty"`
}

RepeatCellRequest sets the Fields of Cell on every cell of Range.

type Request

type Request struct {
	RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"`
}

Request is one batchUpdate edit.

type RowData

type RowData struct {
	Values []*CellData `json:"values,omitempty"`
}

RowData is one row's cells.

type Sheet

type Sheet struct {
	Properties *SheetProperties `json:"properties,omitempty"`
	Merges     []*GridRange     `json:"merges,omitempty"`
	Data       []*GridData      `json:"data,omitempty"`
}

Sheet is one tab: its properties, merges and cells.

type SheetProperties

type SheetProperties struct {
	SheetID int64  `json:"sheetId,omitempty"`
	Title   string `json:"title,omitempty"`
	Index   int64  `json:"index,omitempty"`
}

SheetProperties names a sheet.

type Spreadsheet

type Spreadsheet struct {
	SpreadsheetID string        `json:"spreadsheetId,omitempty"`
	Sheets        []*Sheet      `json:"sheets,omitempty"`
	NamedRanges   []*NamedRange `json:"namedRanges,omitempty"`
}

Spreadsheet is spreadsheets.get with grid data.

type TextFormat

type TextFormat struct {
	Bold                 bool        `json:"bold,omitempty"`
	Italic               bool        `json:"italic,omitempty"`
	Strikethrough        bool        `json:"strikethrough,omitempty"`
	Underline            bool        `json:"underline,omitempty"`
	ForegroundColor      *Color      `json:"foregroundColor,omitempty"`
	ForegroundColorStyle *ColorStyle `json:"foregroundColorStyle,omitempty"`
}

TextFormat is a cell's text style.

type ValueRange

type ValueRange struct {
	Range  string     `json:"range,omitempty"`
	Values [][]string `json:"values,omitempty"`
}

ValueRange is the values of an A1 range.

Jump to

Keyboard shortcuts

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