Can I control the output of insert_row in GSpread?

840 views Asked by At

I have successfully imported some data into Gsheets using Gspread(https://github.com/burnash/gspread). However, I see insert_row is getting both the values and the cell details. Can I control it, I want only 'value' to be imported not the cell details?

worksheet.insert_row(cell_list, row) 

<Cell R1C1 u'this is the value'>, <Cell R1C2 u'this is the value'>, <Cell R1C3 u"this is the value'>

I looked into some gspread related posts on SO, nothing similar. This post gave me some insight gspread or such: help me get cell coordinates (not value)

update_cells(list) works absolutely fine (updates in a given range) but I cannot insert a new row or a new column. For now, I am using this method (update_cells()) which is getting only values for me. Thanks!!

1

There are 1 answers

0
AudioBubble On BEST ANSWER

This works!!

objects = Someapi.issues()    
values = []
for issue in objects: #you can change the range here
    values.append(issue.name)
print values #Ignore this statement, Just see what values are printed!!
worksheet.insert_row(values)

Somebody helped me. Thanks!!