简体   繁体   English

通过 API 将数据导入 Quip 电子表格

[英]Importing data into Quip spreadsheet via API

My task is to write some chunks of data into a Quip Spreadsheet and regularly update it using Quip API.我的任务是将一些数据块写入 Quip 电子表格,并使用 Quip API 定期更新它。

I got the data stored in pandas DataFrame (and can easily convert to any other structure), but the whole issue is around using their API.我得到了存储在 pandas DataFrame 中的数据(并且可以轻松转换为任何其他结构),但整个问题都在于使用他们的 API。 I got through painful authorisation process so now it generally works, but I can't find any proper method to update the lines of the spreadsheet.我经历了痛苦的授权过程,所以现在它通常可以工作,但我找不到任何合适的方法来更新电子表格的行。

I tried with:我试过:

client.add_spreadsheet_row(thread_id=thread_id,spreadsheet='Schedule',updates=['Lalala'])

but it only returns但它只会返回

AttributeError: 'str' object has no attribute 'iterfind' AttributeError: 'str' object 没有属性 'iterfind'

Could anyone share their experience?有人可以分享他们的经验吗?

Ok, if somebody would need it:好的,如果有人需要它:

  1. you parse the web representation of QUIP doc to extract cells IDs.您解析 QUIP 文档的 web 表示以提取单元格 ID。 Use BeautifulSoup for instance以 BeautifulSoup 为例
  2. Than just iterate through those IDS with不仅仅是遍历那些 IDS
client.edit_document(thread_id=thread_id,
                    content = Some_Content,
                    operation=client.REPLACE_SECTION,
                    format='html',
                    section_id=cell_ID)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 quip-api 和 pandas 阅读 Quip 电子表格 - Reading Quip Spreadsheet with quip-api and pandas 在 quip 中自动插入一个 python 数据框 - Automatically insert a python data frame in quip 通过python中的api通过标题查找Google电子表格 - find google spreadsheet by title via api in python 通过标题名称访问 Google 电子表格数据 - Accessing Google Spreadsheet data via header names 使用Wing IDE将数据从dbf导入Excel电子表格 - Importing data from dbf to excel spreadsheet using Wing IDE 通过api导入json数据时如何解决“ TypeError:预期的字符串或缓冲区”? - How to solve “TypeError: expected string or buffer” when importing json data via api? 表格 API:使用 Python 从电子表格中读取数据 - Sheets API: reading data from spreadsheet with Python 通过模型形式将非规范化数据导入Django模型 - Importing Denormalized data into django models via modelforms 如何通过python中的Google Drive API重命名Google电子表格? - How to rename a google spreadsheet via Google Drive API in python? 如何通过 Python API 为 Google 电子表格中的单元格背景着色 - How to color the cell background in Google spreadsheet via Python API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM