Download Google Sheets Using Just the URL

Simple package to download Google Sheets using just the sharing link. Spreadsheets can be downloaded as a data frame, or as plain text to parse manually. Google Sheets is the new name for Google Docs Spreadsheets <>.

Travis-CI Build Status CRAN_Status_Badge

gsheet is a simple package to download Google Sheets (aka Google Docs Spreadsheets) using just the sharing link. Sheets can be downloaded as a data frame, or as plain text to parse manually.


Install from CRAN with:


Or install the latest development version from github wth:


Getting started

Download a google sheet as a table with:



If you want more control, you might want to use something like:

url <- ''
a <- gsheet2text(url, format='csv')
b <- read.csv(a, stringsAsFactors=FALSE)

This way the table can be cleaned before parsing, and different options can be used in parsing.

Downloading other sheets

If you want to download a sheet other than the first, you have to use the direct url, copied from the address bar, like so:

url <- ''
b <- gsheet2tbl(url)

This works because this makes the gid, which is the sheet identifier, available. If you have problems downloading the first sheet, this can also help too.


gsheet 0.4.2

  • fixes to make tests agnostic to use of readr vs base

gsheet 0.4.0

  • gsheet2tbl now uses readr if it is available
  • new function construct_download_url allows manual downloading using readr

gsheet 0.3.0

Minor changes

  • Moved from rvest and xml2 to purely using httr.


  • Changed URL format to match a change made by Google. Resolved #6 and #7

gsheet 0.2.1


  • Fixed issue due to deprecated function in rvest



  • Users can now download from arbitrary sheets, rather than just the first.


  • Now fails with an informative error when 'share by link' is turned off.


  • Fixed namespace bugs (#1)
  • Fixed further namespace bugs resulting from new stringr version

gsheet 0.1

  • First release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.4.5 by Max Conway, 2 years ago

Report a bug at

Browse source code at

Authors: Max Conway [aut, cre]

Documentation:   PDF Manual  

Task views: Web Technologies and Services

GPL-3 license

Imports httr, stringr

Suggests testthat, readr

Imported by gfer, iriR, odk, spiR.

Suggested by GerminaR, huito, inti.

See at CRAN