Google Spreadsheet API on iPhone

I am trying to add a row to an existing table using a list feed. But every time I get the following error: "rror Domain = com.google.GDataServiceDomain Code = 400 UserInfo = 0xeddae4" The operation could not be completed. (Empty lines cannot be written; use delete instead.) "

I am using the following code

GDataEntrySpreadsheetList *listEntry = [GDataEntrySpreadsheetList listEntry]; GDataSpreadsheetCustomElement *serialNo = [GDataSpreadsheetCustomElement elementWithName:@"SNo" stringValue:@"1"]; [array addObject:serialNo]; [[listEntry customElements] initWithArray:array]; //then after finding the worksheet GDataServiceGoogleSpreadsheet *service = [self spreadsheetService]; NSURL *feedURL = [worksheet listFeedURL]; [service fetchEntryByInsertingEntry:listEntry forFeedURL:feedURL delegate:self didFinishSelector:@selector(addTicket:addedEntry:error:)]; 

It seems I am doing something wrong during listEntry initialization.

can someone help me about this or please provide me a sample code to insert a row into a google spreadsheet in Objective C.

Thanks in advance.

+4
source share
1 answer

My problem is resolved by calling the following method:

 [listEntry setCustomElements:array]; 

instead:

 [[listEntry customElements] initWithArray:array]; 

Thanks, Srinivas.M

+4
source

All Articles