views:

148

answers:

1

I've written a C# program using the Google Docs .NET API to read a Google worksheet into a DataTable given a user name, password, spreadsheet name, and worksheet name. This all works fine, but the programming model seems to revolve around giving the spreadsheet service a set of credentials, and then paring down the resulting feed to get a specific spreadsheet/worksheet, i.e.

        SpreadsheetsService service = new SpreadsheetsService("Application-Name");
        service.setUserCredentials(userName, password);

        SpreadsheetQuery spreadsheetQuery = new SpreadsheetQuery();
        SpreadsheetFeed spreadsheetFeed = service.Query(spreadsheetQuery);

        SpreadsheetEntry spreadsheetEntry = (SpreadsheetEntry)(from entries in spreadsheetFeed.Entries
                                                               where entries.Title.Text == spreadsheetName
                                                               select entries).SingleOrDefault();

Now I'm interested in extending the functionality of my program to read from public Google spreadsheets. That is, given the URL of a public Google spreadsheet (e.g. "https://spreadsheets.google.com/ccc?key=BUNCH_OF_LETTERS_HERE&hl=en"), I want to get the SpreadsheetEntry object corresponding to that document.

The method I've been using thus far obviously does not seem to extend to allow this, so I was wondering if anyone knows the proper way to access a public Google document through their API?

A: 

The Google Docs List API doesn't seem setup for that (see ahab's answer).

louisgab
Thanks. I'm following up with the person in that post who said they had figured out a way to hack it, and I'll post back here when I find out what it is. Of course, their method doesn't use the GoogleDocs api so its not technically an answer to this question, but I think it may still be of general interest.
lvilnis