我们在向Google插入多个列时遇到一些问题 来自Google App Engine的电子表格。我们从电子表格中插入 包含600行,每行10列。它只是一个附加物 插入。插入单元格时,我们开始超时 或两周后。
我们正在使用以下调用在java中插入一个单元格:
CellEntry cellEntry = new CellEntry(row, column, "the value of the cell");
serviceWrapper.insert(worksheet.getCellFeedUrl(), cellEntry);
我们可以批量申请新单元格(没有在库中看到它), 我们怎样才能摆脱这些超时(两秒钟),或者做到了 电子表格无法按此速率运行(我们是否需要暂停 在每一批或一批请求之间?)
感谢您的回复
答案 0 :(得分:0)
No, you cannot create a batch request for a new cell
. Google Sheet API supports updating an entrie column, row other set of cells in a single request. This is offered to improve performance over making large sets of individual requests. This process is called "batching requests".
A number of batch operations can be combined into a single request. The two types of batch operations supported are query and update. insert and delete are not supported
because the cells feed cannot be used to insert or delete cells. Remember that the worksheets feed must be used to do that.
query and update
can be combined in any size set, and sent to the API in a single request. The API responds with information on the status of each individual operation within the batch. For query requests, the result is the requested cell. For update requests, the result includes the manipulated cell with new values.
Note: Version v4 of the Google Sheets API is now available! This migration guide shows how to update applications to use v4.
Found this blog, shows how to add multiple columns to Google Spreadsheets: http://trevorfox.com/2015/11/how-to-add-multiple-columns-to-google-spreadsheets