Programatically updating a Google spreadsheet

google-sheets, google-sheets-api, python

Solution

- Clone your template worksheet using the instructions on Copying Documents

- Access the list of worksheets within the cloned document and iterate through to the required spreadsheet.

- Use the cell feed to get the appropriate cell in your spreadsheet, then update the values.

Problem

I've got a pre-existing Google spreadsheet. Each month I update this document. I've got a template workseet in the spreadseet that I'd like to clone and then update. I'd prefer to clone the worksheet rather than create it from scratch as it has some pretty complex formulas. I'm using the Python api for the Google spreadsheets here: http://code.google.com/apis/spreadsheets/data/1.0/developers_guide_python.html Does anyone know how to clone and copy a worksheet in a pre-existing document? Edit I seemed to have confused one reader. I don't have an excel spreadsheet. I only have a Google spreadsheet that has a template worksheet. I'd like to clone this worksheet, rename it and then edit it programatically.

Original source