Python GSpread批处理\u更新/删除范围不执行任何操作

Python GSpread批处理\u更新/删除范围不执行任何操作,python,gspread,Python,Gspread,示例代码: sheet_id = spreadsheet.worksheet(sheetName)._properties['sheetId'] start_index_col = self.cell_data_by_row_col[0][0].col - 1 end_index_col = self.cell_data_by_row_col[0][-1].col - 1 start_index_row = self.cell_data_by_row_col[0][0].row end_ind

示例代码:

sheet_id = spreadsheet.worksheet(sheetName)._properties['sheetId']

start_index_col = self.cell_data_by_row_col[0][0].col - 1
end_index_col = self.cell_data_by_row_col[0][-1].col - 1
start_index_row = self.cell_data_by_row_col[0][0].row
end_index_row = self.cell_data_by_row_col[0][0].row

spreadsheet.batch_update({
    'requests': [
        {
            'deleteRange': {
                'range': {
                    'sheetId': sheet_id,
                    'startRowIndex': start_index_row,
                    'endRowIndex': end_index_row,
                    'startColumnIndex': start_index_col,
                    'endColumnIndex': end_index_col,
                },
                'shiftDimension': 'ROWS',
            }
        }
    ]
})
Google Sheets可以很好地执行更新,但是没有发生任何事情,回复中也没有任何内容


谢谢。

为了正确复制您的情况,您能否提供
开始索引列、结束索引列、开始索引列、结束索引列的示例值
?顺便问一下,当使用
res=spreadsheet.batch\u update({,,})
时,我可以问一下运行脚本时
res
的值吗?