以编程方式更新Google文档上托管的电子表格 [英] Programatically updating a spreadsheet hosted on google docs
问题描述
我已经在google文档上托管了一个预先存在的电子表格.我每个月都会更新此文档.我想在spreadseet中有一个模板workseet,我想对其进行克隆然后更新.
I've got a pre-existing spreadsheet hosted on google docs. 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.
我在这里使用Google文档的Python API:
I'm using the Python api for the google docs 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?
修改
我似乎使一个读者感到困惑.我没有Excel电子表格.我只有一个带有模板工作表的Google文档电子表格.
I seemed to have confused one reader. I don't have an excel spreadsheet. I only have a Google Docs spreadsheet that has a template worksheet.
我想要克隆此工作表,对其进行重命名,然后以编程方式对其进行编辑.
I'd like to clone this worksheet, rename it and then edit it programatically.
推荐答案
- 按照复制文档中的说明克隆模板工作表. a>
- 访问已克隆的工作表列表文档并遍历所需的电子表格.
- 使用单元格供稿以获取适当的单元格中的单元格,然后更新值.
- 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.
这篇关于以编程方式更新Google文档上托管的电子表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!