I am trying to add a list:
test_list = [1,2,3]
But I keep running into this error:
{"response": {"statusCode": 400, "reason": "Bad Request", "content": {"errorCode": 1008, "message": "Unable to parse request. The following error occurred: Unknown attribute "columnId" found at line 1, column 31", "refId": "98878q"}}}
write_AnotherSheet = smartClient.Sheets.get_sheet("Sheet ID")
test_list = [1,2,3]
cells_to_update=[]
destination_row = write_AnotherSheet.rows
column_id = "ColId"
//Loop through the destination_rows length and update rows
for i in range(len(destination_row)):
if i < len(test_list):
data = test_list[i]
else: #ignore if there is no data
data = None
cell = smartClient.models.Cell()
cell.column_id = column_id
cell.value = data
cell.row_id = destination_row[i].id
cells_to_update.append(cell) //append cells to new list
updated_cell = smartClient.Sheets.update_rows(write_AnotherSheet.id, cells_to_update)
And my expected output is as shown on screenshot