gsheets

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Setup Access to run GSheets tests

Reference Materials:

  • Overview of sheets API
  • API Console -- where you go to manage the credentials
  • ../cmd/gsheetssetup/gsheetsetup.go is a Go program to remind me how to set this up for testing!

This is what I do to setup access and remember the details how things get authorized.

    go run cmd/gsheetaccess/gsheetaccess.go

Follow the prompts and suggestions until I get back the contents of my "Sheet1".

Environment variables for testing

SPREADSHEET_ID : The Google Spreadsheet ID taken from the URL (long alpha numeric string)

SHEET_NAME : Name the the sheet in the spread to test, e.g. "Sheet1"

CLIENT_SECRET : Location of the "credentials.json" file.

Documentation

Overview

gsheets.go is a part of the dataset package written to allow import/export of records to/from dataset collections.

Authors R. S. Doiel, <rsdoiel@library.caltech.edu> and Tom Morrel, <tmorrell@library.caltech.edu>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColNoToColLetters added in v0.0.47

func ColNoToColLetters(colNo int) string

ColNoToColLetters converts a zero based column index to a spreadsheet style letter sequence (e.g. 0 -> A, 26 -> AB, 52 -> BA, ..) If colNo is legative then an empty string is returned.

func ReadSheet

func ReadSheet(clientSecretJSON, spreadSheetId, sheetName, cellRange string) ([][]interface{}, error)

func WriteSheet added in v0.0.5

func WriteSheet(clientSecretJSON, spreadSheetId, sheetName, cellRange string, table [][]interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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