简体   繁体   中英

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.

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. 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'

Could anyone share their experience?

Ok, if somebody would need it:

  1. you parse the web representation of QUIP doc to extract cells IDs. Use BeautifulSoup for instance
  2. Than just iterate through those IDS with
client.edit_document(thread_id=thread_id,
                    content = Some_Content,
                    operation=client.REPLACE_SECTION,
                    format='html',
                    section_id=cell_ID)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM