On Fri, Nov 18, 2011 at 1:18 PM, Tom Morris <[email protected]> wrote:
> Thanks for the reply, Vic, but this isn't a spreadsheet that I control, so > I can't changed it. It's shared in such a way that I can access it through > a browser (at https://docs.google.com/**spreadsheet/ccc?key=** > 0AuCc2KRWCBN7dDlSSVBpcU5IZnVTW**W5TVzhqY3V0WGc<https://docs.google.com/spreadsheet/ccc?key=0AuCc2KRWCBN7dDlSSVBpcU5IZnVTWW5TVzhqY3V0WGc>) > even > if I'm not logged in and I can even download Excel, CSV, etc versions of it. > > Sorry, this is something that we'll resolve in a future version of the API. However, at this time, the spreadsheet must be published :( A possible solution here would be to copy the spreadsheet, and then publish the copy. > What I want is to be able to read the data into Google Refine, preferably > by using the Spreadsheet API (so I can let the user select worksheets, > etc), but downloading an Excel file would be an adequate substitute. Since > I can access it from a browser, it seems like it should be possible to > access it through the API, but I can't figure out the magic incantation. > > Tom > > > On Friday, November 18, 2011 12:18:29 PM UTC-5, Vic Fryzel wrote: > >> The "public" visibility of the Spreadsheets feed requires the spreadsheet >> to be published. To enable this, in the spreadsheet, go to File > Publish >> to the Web... >> >> Thanks, >> -Vic >> >> >> >> On Thu, Nov 17, 2011 at 6:15 PM, Tom Morris <[email protected]> wrote: >> >>> OK, this is driving me nuts. In Google Refine I have a Java >>> implementation which works with private spreadsheets (when authenticated) >>> and *most* public spreadsheets, but every now and then I come across a URL >>> which works fine in a browser, but doesn't work with my implementation no >>> matter what I try. >>> >>> An example is https://docs.google.com/**spreadsheet/ccc?key=** >>> 0AuCc2KRWCBN7dDlSSVBpcU5IZnVTW**W5TVzhqY3V0WGc<https://docs.google.com/spreadsheet/ccc?key=0AuCc2KRWCBN7dDlSSVBpcU5IZnVTWW5TVzhqY3V0WGc> >>> >>> If I'm not logged in, I can open that URL in a browser without any >>> problem and it'll offer me the option to download Excel, CSV, etc. >>> >>> However if I use the key to construct a worksheet feed URL: >>> >>> http://spreadsheets.google.**com/feeds/worksheets/** >>> 0AuCc2KRWCBN7dDlSSVBpcU5IZnVTW**W5TVzhqY3V0WGc/public/basic<http://spreadsheets.google.com/feeds/worksheets/0AuCc2KRWCBN7dDlSSVBpcU5IZnVTWW5TVzhqY3V0WGc/public/basic> >>> >>> and try to use with when I try to use it with SpreadsheetService.getFeed( >>> **url,WorksheetFeed.class) and the Java client library throws an >>> InvalidEntryException. Hitting that URL in a browser returns "The >>> spreadsheet at this URL could not be found. Make sure that you have the >>> right URL and that the owner of the spreadsheet hasn't deleted it." >>> >>> Strangely, if I'm logged in, the public feed URL still doesn't work, but >>> the following private one does, at least in a browser: >>> >>> http://spreadsheets.google.**com/feeds/worksheets/** >>> 0AuCc2KRWCBN7dDlSSVBpcU5IZnVTW**W5TVzhqY3V0WGc/private/basic<https://spreadsheets.google.com/feeds/worksheets/0AuCc2KRWCBN7dDlSSVBpcU5IZnVTWW5TVzhqY3V0WGc/public/basic> >>> >>> How can I open this spreadsheet using the Java client libraries? How do >>> I identify spreadsheets which are in this special category? >>> >>> If it's impossible to get this through the API, second best would be to >>> download the Excel file, but appending &format=xls to the URL doesn't seem >>> to do anything. >>> >>> Thanks in advance for your insights and guidance! >>> >> >>
