我正在嘗試用 python 更新我的谷歌電子表格。不幸的是,我的代碼總是更新左側的一列/單元格。我的代碼:headers = wks2.row_values(7)colToUpdate = headers.index("12.11.")#find the charcellLookup = wks2.find('Gul')# get the cell to be updatedcellToUpdate = wks2.cell(cellLookup.row, colToUpdate)# update the cell's valuecellToUpdate.value = 3# put it in the queuecell_list.append(cellToUpdate)# now, do itwks2.update_cells(cell_list)print(cell_list)輸出 [<Cell R8C6 3>] 但它應該是/它希望它是 R8C7。我可以改變他從 1 開始計數或者只是添加 +1 或類似的東西嗎?我添加了電子表格的圖像。
Python 谷歌電子表格更新在錯誤的列中
幕布斯7119047
2023-12-09 16:55:59