如何使用python写回Google文档电子表格中的某个单元格 [英] How to write back to a certain cell in google doc spreadsheet using python

查看:46
本文介绍了如何使用python写回Google文档电子表格中的某个单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以问题是,我从电子表格的行的第一列中获取了一些信息(例如A2),然后我将对该信息进行一些检查,之后我想写回排结果,我该怎么做?是否有某些功能可以让我在后面,前面,上面,下面指示该列?这样我就可以在那个单元格中写信息了.

So the problem is, i get some information from first column of the row (for example A2 ) from the spreadsheet, then i will do some checking with that information, after that i want to write back to the next column in the row the result, how do i do that? Is there a certain function to allow me to indicate the column behind, in front, above, below? So i can write information in that cell.

推荐答案

当然,Python中Google Spreadsheet API的文档为此处;要获取所需的单元格范围供稿",请参见此处-例如,基本上说在下面",获取所需的特定列的单元格供稿和两行(您正在阅读的行和您正在编写的行),读取其中一个单元格(范围中最上面的一个),更新另一个(范围中最下面的一个).

Sure, the docs for Google Spreadsheet API in Python are here. To create or update a cell, see here; to get the "cell range feed" you need, see here -- basically to say "below" for example, get the cell feed for the specific column you want and the two rows (the one you're reading and the one you're writing), read one of the cells (the top one in the range), update the other one (the bottom one in the range).

有关Python API基础协议的详细信息,请参见 (例如,您可以在其中获取有关所涉及的各种对象的属性& c的信息).

For details of the protocol underlying the Python API, see here (that's where you get info on what attributes &c exist for the various objects involved, for example).

这篇关于如何使用python写回Google文档电子表格中的某个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆