Updating a big spreadsheet is taking time Objective-C Client

59 views
Skip to first unread message

aniket rawat

unread,
Jan 16, 2013, 3:59:31 AM1/16/13
to gdata-objec...@googlegroups.com
Hi,
I am inserting a record at the last row in my spreadsheet, now the problem is that my spreadsheet has about 2000 records ,so it taking a lot of time every time i add a new record.
  1. I first fetch feed from my spreadsheet
  2. Then i check the feed for the particular spreadsheet i need to update
  3. Then i fetch the worksheet for that particular spreadsheet
  4. Then i fetch the entriesTicket for the worksheet
  5. Finally i increment the row and update the spreadsheet like this:

{

    [cell setInputString:str];
    [cell setRow:row];
    [cell setColumn:column];
    [cell setResultString:str];

    [service fetchEntryByInsertingEntry:entry
                             forFeedURL:feedURL
                               delegate:self
                      didFinishSelector:@selector(updateEntriesTicket:finishedWithFeed:error:)];

}

I believe my approach first gets all the rows in the spreadsheet and then updates the row at +1 increment, so this process will be slow due to the number of records in the spreadsheet.
I need an approach to insert the new record at the first location of the spreadsheet not the last, such that i don't have to fetch all the records, or to directly add at the last row with a faster logic.
Please help.

Thanks


aniket rawat

unread,
Jan 16, 2013, 8:19:32 AM1/16/13
to gdata-objec...@googlegroups.com
Actually the process from 3 to 4 takes time.

Greg Robbins

unread,
Jan 16, 2013, 4:35:15 PM1/16/13
to gdata-objec...@googlegroups.com
The batch update feature is the primary mechanism for speeding up use of the cells API.


Questions about the Spreadsheet API may be posted to the discussion group at http://groups.google.com/group/google-spreadsheets-api

Aniketece

unread,
Jan 16, 2013, 4:56:21 PM1/16/13
to gdata-objec...@googlegroups.com
I just have to update one cell at a time.

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objec...@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.
Reply all
Reply to author
Forward
0 new messages