Python script to download Google spreadsheet.

I like to automate tasks, I think every software engineer like that, right? After all thats our job. I wrote the following script for downloading google spreadsheet as csv. Just got it when I was going through my old code base, hopefully it would help someone else too.

To run the script you have to install gdata python module.

 

You have to run the script like below:


python gdooc.py spread_sheet_id#gid=tab_id

For example check the following screenshot:

cmd

 

And after downloading you will have the csv file in the same directory, currently the document id is being used as name of the csv file, you can change it as you want.

Happy Coding 🙂

Advertisements

3 comments

  1. Samara · July 4, 2014

    This content is very informative but it took me a long time to
    find it in google. I found it on 19 spot, you should focus on quality backlinks building, it will
    help you to increase traffic. And i know how to help you, just search in google
    – k2 seo tips and tricks

  2. AJ · June 15, 2016

    Very helpful! Searched several solutions, but none worked… and then I found this.

  3. yang · September 8, 2016

    I got an error message
    gdata.service.Error: This entry cannot be exported as a different format
    why is that?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s