Note that there are some explanatory texts on larger screens.

plurals
  1. POParse Google spreadsheet URL without authentication
    primarykey
    data
    text
    <p>My aim is to retrieve CellFeeds from Google spreadsheet URLs <strong>without authentication</strong>. I tried it with the following spreadsheet URL (published to web): <a href="https://docs.google.com/spreadsheet/ccc?key=0AvNWoDP9TASIdERsbFRnNXdsN2x4MXMxUmlyY0g3VUE&amp;usp=sharing" rel="nofollow">https://docs.google.com/spreadsheet/ccc?key=0AvNWoDP9TASIdERsbFRnNXdsN2x4MXMxUmlyY0g3VUE&amp;usp=sharing</a></p> <p>This URL is stored in variable "spreadsheetName". First attempt was to take the <strong>whole URL</strong> as argument for Service.getFeed().<br> <code>url = new URL(spreadsheetName); WorksheetFeed feed = service.getFeed(url, WorksheetFeed.class); </code></p> <p>But then I ran into following exception :</p> <pre><code>com.google.gdata.util.RedirectRequiredException: Found &lt;HTML&gt;&lt;HEAD&gt;&lt;meta http-equiv="content-type" content="text/html;charset=utf-8"&gt; &lt;TITLE&gt;302 Moved&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt; &lt;H1&gt;302 Moved&lt;/H1&gt; The document has moved </code></pre> <p>Second attempt was to build the URL with the <strong>key</strong> from the origin URL, using FeedURLFactory:</p> <pre><code>String key = spreadsheetName.split("key=")[1].substring(0, 44); url = FeedURLFactory.getDefault().getCellFeedUrl(key, worksheetName, "public", "basic"); WorksheetFeed feed = service.getFeed(url, WorksheetFeed.class); </code></pre> <p>...and I got the next exception: </p> <pre><code>com.google.gdata.util.InvalidEntryException: Bad Request Invalid query parameter value for grid-id. </code></pre> <p>Do you have any ideas what I did wrong or is there anybody who successfully retrieved data from spreadsheet URLs without authentication? Thx in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload