Hello List,
I'm confused after I read doc and search info :(
There is a worksheet in spreadsheet, I would like to delete a row. I've
used AddUpdate method in a batchRequest instance, it works. I think I use
AddDelete method like AddUpdate, but it doesn't work:
(Python code)
q = gdata.spreadsheet.service.CellQuery()
q.min_row, q.max_row = row, row
cellsfeed = spr_client.GetCellsFeed(spreadsheetid, worksheetid, query = q)
batchRequest = gdata.spreadsheet.SpreadsheetsCellsFeed()
for i in range(0, len(cellsfeed.entry)):
c = cellsfeed.entry[i]
batchRequest.AddDelete(entry=c)
updated = spr_client.ExecuteBatch(batchRequest,
cellsfeed.GetBatchLink().href)
but updated gives an XML string, which contains internal errors, eg.:
<ns0:entry><ns0:id>https://spreadsheets.google.com/feeds/cells/0A..../od6/private/full/RXXXC2</ns0:id><ns0:content
type="text">Internal Error</ns0:content>
with no reason.
I've read the docs:
https://developers.google.com/google-apps/spreadsheets/#updating_a_list_row
and it says:
"The two types of batch operations supported are query and update. insertand
delete are not supported because the cells feed cannot be used to insert or
delete cells."
What can I do?
Thanks:
airween