Importing data into Quip spreadsheet via API

2.1k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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)