Anvil Community Forum

[FIXED] Writing to Specific Cells in Google Sheet

I am attempting to update specific cells in a Google sheet. This sheet is a template, so I should only be inserting into or modifying specific cells.

I CAN successfully add a row, if that was the desired outcome.

Reading the Anvil docs, the below appears to be a valid statement:
ws[2, 2].value = “asdf”

I’ve also tried explicitly naming the cell (ws[‘C4’].value = “asdf”), however that also fails.

When the destination cell is empty, I receive this error:
AttributeError: ‘NoneType’ object has no attribute ‘value’

When I put a placeholder into the destination cell, it does write “asdf”, but always to cell A1 (which is a column header), regardless of what row-column parameters are given.

Here is an image of add_row functioning fine in rows 6 & 7, the placeholder “x” values to avoid the NoneType error, and the value of “asdf” always in the very first cell.

I hope someone can assist.


Thanks for reporting - we’ve moved it to bug reports (I’m able to reproduce).
We’ll reply to this thread when we have an update.


This should now be fixed - thanks for the report!