Hello,

I use Google Spreadsheet to store my data;

I would like to use GAE to retrieve these data and perform
calculations on it;

I use the following code to get the data from the spreadsheet server -
executed in a GAE task queue:

ListFeed  rows1[int_year - 1993] =
getData_Query_ListFeed("( (zahlungsdatum >= 01-01-" + year + ") &&
(zahlungsdatum <= 31-12-" + year + ") )","zahlungsdatum");

private ListFeed getData_Query_ListFeed(String queryString, String
orderByColumn)
{
  ListFeed rowFeed = new ListFeed();
  try
  {
    // get rows and cell data
    URL metafeedUrl = new URL("http://spreadsheets.google.com/feeds/
spreadsheets/private/full");
    SpreadsheetFeed feed = spreadsheetService.getFeed(metafeedUrl,
SpreadsheetFeed.class);
    java.util.List<SpreadsheetEntry> spreadsheets = feed.getEntries();
    ListQuery query = new
ListQuery(spreadsheets.get(spreadsheet_index).getWorksheets().get(worksheet_index).getListFeedUrl());
    query.setSpreadsheetQuery(queryString);
    query.setSortColumn(orderByColumn);
    rowFeed = spreadsheetService.query(query, ListFeed.class);
  }
  catch(Exception ex){}
  return rowFeed;
}

with the following line I check, that I have received data from the
Google spreadsheet server:
res = rows1[int_year - 1993].getEntries().size();

if res is 0, I repeat the task; if res is greater 0, I move to the
next task;

when I run this code on my localhost GAE server within Eclipse
everything works very well;

when I execute the code on the GAE Web Server, I very often get res=0
back; that means, I have very often to repeat the task;
I checked the log files on the GAE server - it looks like that the 30
sec limitation for a request is not touched;
it looks like that the code of the task is not executed;
nevertheless, sometimes it works fine;

has someone an idea what I am doing wrong?
is there a better way to access the Google Spreadsheets from GAE?

thank you very much in advance for your help;

Best Regards
Rudolf

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to