Python Gspread append_将数据追加到不同列的行

Python Gspread append_将数据追加到不同列的行,python,gspread,Python,Gspread,我正在使用append_行将数据添加到google工作表中。。。我不明白为什么会这样 #the code def write_to_dangersheet(flow): credentials_file = "file.json" scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'

我正在使用append_行将数据添加到google工作表中。。。我不明白为什么会这样
#the code
def write_to_dangersheet(flow):
            credentials_file = "file.json"
            scope = ['https://spreadsheets.google.com/feeds',
                     'https://www.googleapis.com/auth/drive']
            credentials = ServiceAccountCredentials.from_json_keyfile_name(credentials_file, scope)
            gc=gspread.authorize(credentials)

            test_wb=gc.open_by_key('yyyyyyyyyyyyyy').worksheet('betaflow')

            f=[phonenumber,date," ",flow,]

            if flow=='webhook-test':
                test_wb.append_row(f)
        write_to_dangersheet(flow)

使用
append\u row()
table\u range
参数显式指定表格范围:

worksheet.append_行(['Test1',''Test2',table_range='A1')
背景:

工作表.append_row()
方法对应于工作表API

调用
spreadsheets.values.append
时,它搜索逻辑“表”以追加一行值。值将追加到表的下一行,从表的第一列开始

根据电子表格中的数据,可能有几个潜在的“表”(通常由空列或空行分隔)。默认情况下,
append_row()
不指定要使用哪个“表”,并允许Sheets API隐式检测该表。在有多个表的情况下,Sheets API可以选择您不打算附加到的“表”。在这种情况下,您需要显式地告诉API要使用哪个逻辑“表”


Google Sheets API v4文档的一节中有一个很好的例子,说明一张工作表中有多个表。

不幸的是,从您的脚本中,您的问题无法复制。那么,我可以问一下复制问题的详细方法吗?请参阅我在gspread问题中的回答: