3
votes

I'm using json-in-script to put content from a Google Spreadsheet on a web page. The spreadsheet has hyperlinks on some of the text in the cells. JSON doesn't seem to be getting anything other than the plain text of the spreadsheet, and no markup like hyperlinks. How do you get hyperlinks? Can you with JSON?

This is the src of what I'm importing:

http://spreadsheets.google.com/feeds/cells/0Aipg92XowKCndHhtbnZXQkllWEUzUjBEc3NkQXppdnc/1/public/values?alt=json-in-script&callback=cellEntries&min-row=2&min-col=1&max-col=7

This is the link to the spreadsheet (see how the items in col1 are linked?)

https://spreadsheets.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0Aipg92XowKCndHhtbnZXQkllWEUzUjBEc3NkQXppdnc&output=html

Can anyone advise me how to get the hyperlinks?

Thanks!

2

2 Answers

0
votes

You'll want to do some post-processing, checking if a value matches a URL. If it does, create your own tag for it.

Use one of these:

http://www.google.com/search?q=url+regex

Also, you know that you can embed Google Spreadsheets directly in a webpage? I'm guessing you're not doing this because it would use an iFrame, and what you want is the actual data?

0
votes

Rather than using the Google Speadsheets API (which is quite cumbersome), you should use jsondata.com. It'll let you upload all the data from a .csv and embed it in your site with YouTube-style embed code.

The post processing is a piece of cake when you get your entire dataset to your application in a nicely formatted JSON object.