Sorry, I remove a couple of messages after finding out the answers
myself or spelling errors.

But as I was fooling around with entries, I found that getHtmlLink has
a bug.

Expected links:
http://docs.google.com/a/domain/Doc?docid=key&hl=en
http://docs.google.com/a/domain/fileview?id=key&hl=en
http://spreadsheets.google.com/a/domain/ccc?key=key&hl=en

Returned links:
http://docs.google.com/a/domain/a/domain/Doc?docid=key&hl=en
http://docs.google.com/a/domain/a/domain/fileview?id=key&hl=en
http://spreadsheets.google.com/a/domain/a/domain/ccc?key=key&hl=en

Should I submit this issue?

Any advise on how to proceed on creating a table or is there also a
bug?

On Jul 13, 5:52 pm, Daniel <lt.ch...@gmail.com> wrote:
> I'm having trouble following the "create a table" example given in the
> JAVA "working with table feeds" section.
>
> I get a "Not Found" message when trying to create a table.
>
> In the example, I'm assuming "spreadsheetEntry" is actually a
> FeedURLFactory, and tablesFeedUrl at the end is actually tableFeedUrl.
>
> The POST code does follow the "http://spreadsheets.google.com/feeds/
> key/tables" format.
>
> Here's my code:
>
> DocsService client = new DocsService("Test Documents");
> client.setUserCredentials(mail, password);
>
> URL feedUrl = new URL("http://docs.google.com/feeds/documents/private/
> full/");
>
> DocumentListFeed resultFeed = client.getFeed(feedUrl,
> DocumentListFeed.class);
> DocumentListEntry newEntry = new Spreadsheet.Entry();
> newEntry.setTitle(new PlainTextConstruct("TestSpreadsheetTable"));
> client.insert(feedUrl, newEntry);
>
> SpreadsheetService service = new SpreadsheetService("Test
> Spreadsheet");
> service.setUserCredentials(mail, password);
>
> TableEntry tableEntry = new TableEntry();
> FeedURLFactory factory = FeedURLFactory.getDefault();
>
> URL tableFeedUrl = factory.getTableFeedUrl(newEntry.getKey());
>
> // Specify a basic table:
> tableEntry.setTitle(new PlainTextConstruct("New Table"));
> tableEntry.setWorksheet(new Worksheet("Sheet1"));
> tableEntry.setHeader(new Header(1));
>
> // Specify columns in the table, start row, number of rows.
> Data tableData = new Data();
> tableData.setNumberOfRows(0);
> // Start row index cannot overlap with header row.
> tableData.setStartIndex(2);
> // This table has only one column.
> tableData.addColumn(new Column("A", "Column A"));
>
> tableEntry.setData(tableData);
> service.insert(tableFeedUrl, tableEntry);
--~--~---------~--~----~------------~-------~--~----~
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