Hi,
I am trying to learn how to use the Google Spreadsheets API through the Developer's Guide: Java. My application can authenticate to the spreadsheets service,retrieve a worksheet-based feed and create a table. The next step would be to create a table record what I am trying to do. My problem is when I run the application I obtain this error :
Service failure
com.google.gdata.util.InvalidEntryException: Bad Request
[Line 1, Column 429, element entry] Required extension element http://schemas.google.com/spreadsheets/2006:header not found.
This is the code part for the creation of the table :
//Creating a table record
String nameValuePairs = "Column A=Rosa";
RecordEntry entryToChange = new RecordEntry();
// Split first by the commas between the different fields.
for (String nameValuePair : nameValuePairs.split(",")) {
// Then split by the equal sign.
String[] parts = nameValuePair.split("=", 2);
String name = parts[0]; // such as "name"
String value = parts[1]; // such as "Fred"
entryToChange.addField(new Field(null, name, value));
}
try {
myService.insert(tableFeedUrl, entryToChange);
} catch (IOException e) {
System.err.println("I/0 problem");
e.printStackTrace();
} catch (ServiceException e) {
System.err.println("Service failure");
e.printStackTrace();
}
tableFeedUrl :
tableFeedUrl = factory.getTableFeedUrl(entry.getKey());
entry :
entry = spreadsheets.get(0);
Apparently the problem come from :
myService.insert(tableFeedUrl, entryToChange);
but I am not sure and I don't understand why...
Thank you for your help.