Open Any Document in Google Docs Via a Url

by Justin Ball on August 28th, 2008

We are looking at ways to integrate the new Teachers Without Borders site with Google docs.

Turns out that you can open:
documents - .pdf, .doc, .txt, .html, .rtf and .odt
spreadsheets - .xls, .csv, .ods
presentations - .ppt

By feeding the file url to this google url:

http://docs.google.com/?DocAction=updoc&formsubmitted=true&uploadURL=DOCUMENT_URL

Here's an example if you needed to view a W4 form from the IRS url:

http://www.irs.gov/pub/irs-pdf/fw4.pdf

Use this url:

http://docs.google.com/?DocAction=updoc&formsubmitted=true&uploadURL=http%3A%2F%2Fwww.irs.gov%2Fpub%2Firs-pdf%2Ffw4.pdf

http://docs.google.com/?DocAction=updoc&formsubmitted=true&uploadURL=http://www.irs.gov/pub/irs-pdf/fw4.pdf

View Comments
  1. You’re the one to do it, Justin!

  2. I am looking for a way to open a “google document” via a URL on a web page (or other allowed locations for such a link) – and I think you are saying you figured out how to do that but the link you provided was truncated. Could you reply to my email tom@gafyd.net and tell me if you know how to achieve what I’m seeking to do….. Thanks Much TOM

  3. I’ve been experimenting with this a bit and it would appear that Google has recently added some security that prevents you from opening a document directly via the url. Not sure why they would do this but personally I have started to find that Google doesn’t really like mashups or useful integrations. They provide APIs but I tend to find them far more complicated than they need to be (why should everything need to be a large atom based document you submit via a post) and far less useful than most. The url hack was an awesome way to make it easy for a user to add a link that let other users import a document into Google docs. Big failure here Google.

  4. nikki permalink

    Hi, I just tried this and it didn’t work – just sent me right to my docs homepage. Perhaps they’ve changed the google url? Any other suggestions?

  5. Google shut down this hack so now you have to use their apis which sucks because instead of five minutes to create a link you have to spend two days integrating their api calls and the user experience stinks (they have to login to Google and are required to follow several more steps).

    It was nice when it worked. Wish Google would be more open.

  6. ita very good facility

  7. Michael permalink

    hey this doesn't work anymore, it is my educated guess that google has changed the HTTP request for this function from GET to POST so url parameters won't work…

    just to let you know

  8. jbasdf permalink

    Ya, Google changed their api. This was a cool hack while it lasted. I think there is still a way to do it but you have to write quite a bit more code and work with their api.

  9. peptopinkboots permalink

    Very useful. Thank you!

  10. I developed a nice little app that helps you use Google docs just like you'd use a regular office suite.
    If you're interested, have a look at http://www.gdocsopen.com

    Hope this helps someone!

  11. I developed a nice little app that helps you use Google docs just like you'd use a regular office suite.
    If you're interested, have a look at http://www.gdocsopen.com

    Hope this helps someone!

  12. garima5 permalink

    Gifts to goa, Flowers to goa, Cakes to goa,Same Day delivery all over goa
     http://www.goaonlinegifts.com

  13. garima5 permalink

    Gifts to goa, Flowers to goa, Cakes to goa,Same Day delivery all over goa
     http://www.goaonlinegifts.com

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS