tags:

views:

258

answers:

1

Hi All,

I'm trying to add a row to an existing spreadsheet using list feed. But Every time I'm getting the following error "rror Domain=com.google.GDataServiceDomain Code=400 UserInfo=0xeddae4 "Operation could not be completed. (Blank rows cannot be written; use delete instead.)"

I'm 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'm doing something wrong during the initialization of listEntry.

can some one help me on this or please provide me a sample code to insert a row into Google spreadsheet in Objective C.

Thanks in advance.

A: 

Hi,

I have got my problem resolved by calling the following method:

[listEntry setCustomElements:array];

instead of:

[[listEntry customElements] initWithArray:array];

Thanks, Srinivas.M

srinivas