Skip to content

Google Go (golang) library for reading and writing spreadsheet files on Google Docs.

Notifications You must be signed in to change notification settings

PotentialWeb/spreadsheet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spreadsheet

GoDoc

Package spreadsheet is currently under construction.

Any pull-request is welcome.

Example

package main

import (
  "io/ioutil"

  "github.com/Iwark/spreadsheet"
  "golang.org/x/oauth2"
  "golang.org/x/oauth2/google"
)

func main(){
  data, _ := ioutil.ReadFile("client_secret.json")
  conf, _ := google.JWTConfigFromJSON(data, spreadsheet.SpreadsheetScope)
  client := conf.Client(oauth2.NoContext)

  service, _ := spreadsheet.New(client)
  sheets, _ := service.Sheets.Worksheets("1mYiA2T4_QTFUkAXk0BE3u7snN2o5FgSRqxmRrn_Dzh4")
  ws, _ = sheets.Get(0)
  for _, row := range ws.Rows {
    for _, cell := range row {
      fmt.Println(cell.Content)
    }
  }

  // Update cell content
  ws.Rows[0][0].Update("hogehoge")

  // Make sure call Synchronize to reflect the changes
  ws.Synchronize()
}

License

Spreadsheet is released under the MIT License.

About

Google Go (golang) library for reading and writing spreadsheet files on Google Docs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%