[Fixed] When writing to a specific cell in sheet 2, Google Sheets writes it on sheet 1!

What I’m trying to do:

Writing to a specific cell in sheet 2, Google Sheets writes it on sheet 1!
when click
Google Sheets writes True on sheet 1 instead of sheet 2
What I’ve tried and what’s not working:
here is the image before:
Screen Shot 2022-08-18 at 1.15.27 PM
and here is the image after (it writes always in sheet 1):
Screen Shot 2022-08-18 at 1.31.11 PM

Code Sample:

def primary_color_1_click(self, **event_args):

def update(rid,cid,v):
   # print(rid,cid)
    lib = app_files.untitled_spreadsheet
    worksheet2 = lib[1]
    cell = worksheet2.get_cell(rid,cid)
    cell.value = v
   #cell.input_value = v
# this is a formatted code snippet.
# paste your code between ``` 

Clone link:
you need to create google sheet and use google API
share a copy of your app

I don’t use Google Sheets. But library authors often disagree about whether to number lists from 0 or from 1. Is it possible that `lib[1]’ refers to Sheet 1?

I had tried that, but it gave me index error: list index out of range.
I used lib[1] to get data from sheet2, but when it comes to writing for some reason it insists to write in sheet1 :thinking:

Sounds like a bug to me. We’ll get that fixed and update this thread when that’s done.

1 Like

This should now be fixed