Code covered by the BSD License  

Highlights from
GetGoogleSpreadsheet

5.0
5.0 | 2 ratings Rate this file 10 Downloads (last 30 days) File Size: 1.97 KB File ID: #39915 Version: 1.0

GetGoogleSpreadsheet

by

Daniel (view profile)

 

Download a google spreadsheet as csv and import into a Matlab cell array.

| Watch this File

File Information
Description

result = GetGoogleSpreadsheet(DOCID)

[DOCID] see the value after 'key=' in your spreadsheet's url
         e.g. '0AmQ013fj5234gSXFAWLK1REgwRW02hsd3c'

[result] cell array of the the values in the spreadsheet

IMPORTANT: The spreadsheet must be shared with the "anyone with the link" option

This has no error handling and has not been extensively tested.
Please report issues in comments below.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
12 Jun 2015 Mark T.

Mark T. (view profile)

@Daniel,

Thank you very much! This works perfectly when the sheet is set up to be viewed by anyone with the link. Otherwise, the output contains a large cell array of html.

Is there any way to make this work for sheets that are set up without sharing?

Also, your description may benefit from edits according to the following...

@Adam,

When I access my sheet in browser I see a URL that looks like this:
https://docs.google.com/spreadsheets/d/<the text here is the doc id>/edit#gid=0

Hope this helps!

~Mark

02 Apr 2015 Adam Danz

Adam Danz (view profile)

This looks incredibly useful.

Any updates now that google sheets has been merged with good drive and no longer contains the 'key=' part (replaced with /d/ but still doesn't work with this code) ?

Comment only
22 Jul 2013 Nagavenkat

worked perfectly
Thank you

Contact us