2013-03-19 50 views
1

我正在使用Java中的批處理請求示例從下面的鏈接。它在兩週內運轉良好,但突然間它沒有,過去幾周我沒有改變任何東西。 https://developers.google.com/google-apps/spreadsheets/?hl=en#updating_multiple_cells_with_a_batch_request谷歌電子表格API批處理請求 - BatchInterruptedException:已經發送批處理操作響應更新id ='R2C1'

,我發現了以下錯誤:

com.google.gdata.client.batch.BatchInterruptedException: Batch Interrupted (some operations might have succeeded) : a response has already been sent for batch operation update id='R2C1' 
at com.google.gdata.model.batch.BatchUtils.throwIfInterrupted(BatchUtils.java:256) 
at com.google.gdata.client.Service.batch(Service.java:1459) 
at com.google.gdata.client.GoogleService.batch(GoogleService.java:770) 
at external.GoogleDriveService.insertDataEntries(GoogleDriveService.java:260) 
at external.GoogleDriveService.populateDocument(GoogleDriveService.java:111) 
at controllers.Application.getSourceSpreadsheet(Application.java:234) 
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:557) 
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:508) 
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484) 
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479) 
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161) 

在此先感謝

解決方案: 我忘了相對於批量要求的行和列工作表的大小修改。例如:

WorksheetEntry worksheet = worksheets.get(0); 
worksheet.Cols = 10; 
worksheet.Rows = 150; 
worksheet.Update(); 

回答

1

想通了。查看問題的解決方案。