Hi, all.

I've got problem with spreadsheet creation. For this purpose I'm using
Google Docs Data Api v2.0 with Java Client Api.
Well, what am I doing? I'm creating new spreadsheet as in
documentation. It looks like that:

<code>
                SpreadsheetEntry newEntry = new SpreadsheetEntry();

                newEntry.setTitle( new PlainTextConstruct( title ) );

                SpreadsheetEntry resultEntry = docsService.insert
( getURLForDocsService(), newEntry );
</code>
(SpreadsheetEntry from package com.google.gdata.data.docs).

In the next step I'm trying to retrieve this spreadsheet by title
using Spreadsheet Api.

<code>
                SpreadsheetQuery spreadsheetQuery = new SpreadsheetQuery(
                                                                        
feedURLFactory.getSpreadsheetsFeedUrl() );
                spreadsheetQuery.setTitleQuery( title );

                SpreadsheetFeed spreadsheetFeed = spreadsheetService.query(
                                                                        
spreadsheetQuery, SpreadsheetFeed.class );

                return SpreadsheetUtil.getLatest( spreadsheetFeed.getEntries());
</code>
(SpreadsheetEntry from package com.google.gdata.data.spreadsheet;
SpreadsheetUtil#getLatest() is my utility method for getting latest
spreadsheet if there is several spreadsheets with the same title.)

I looks greate, but some times spreadsheet service responds with empty
feeds when I search by title with which spreadsheet was created.
Problem is created spreadsheet is in Google Spreadsheets but
spreadsheet service doesn't get it. What's wrong?

By the way, what's interesting the same is with spreadsheet uploading.
I'm trying to upload spreadsheet, then I'm trying to fetch it. It's in
server but spreadsheet service responds with empty feed.
This situation isn't permanent but it occurs really often. Now I'm
fetching spreadsheet in cycle, but it's not work with 100 % result.

Best regards, Alexander.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to