Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Save all sheets in a Google Sheets doc as multiple CSV files

License

Notifications You must be signed in to change notification settings

baltimore-sun-data/sheets-save-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sheets-save-all

Save all sheets in a Google Sheets doc as CSV. Requires an OAuth 2.0 token to access Google Sheets.

Installation

First install Go.

If you just want to install the binary to your current directory and don't care about the source code, run

GOBIN="$(pwd)" GOPATH="$(mktemp -d)" go get github.com/baltimore-sun-data/sheets-save-all

Usage

$ sheets-save-all -h
sheets-save-all is a tool to save all sheets in Google Sheets document.

-path and -filename are Go templates and can use any property of the document
or sheet object respectively. See gopkg.in/Iwark/spreadsheet.v2 for properties.

Usage of sheets-save-all:

  -client-secret string
        Google client secret (default $GOOGLE_CLIENT_SECRET)
  -crlf
        use Windows-style line endings
  -filename string
        file name for files (default "{{.Properties.Index}} {{.Properties.Title}}.csv")
  -path string
        path to save files in (default "{{.Properties.Title}}")
  -quiet
        don't log activity
  -sheet string
        Google Sheet ID

About

Save all sheets in a Google Sheets doc as multiple CSV files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages