Android Question How to display data from Google spreadsheet?

cenyu

Active Member
Licensed User
Longtime User
Hi i can't read data from Google spreadsheet. Is there a example code? Help!
 

eurojam

Well-Known Member
Licensed User
Longtime User
If you have a spreadsheet in google, the link is something like this one:

https://docs.google.com/spreadsheets/d/1lZDOwszmh0LTv1EiiCkRZQAnrFnpobtaSshmQvgtWbA/edit?usp=sharing

If you want to access it with B4a you can use httputils or OKHTTP (Get or Download Request). The URL should be something like this:

https://spreadsheets.google.com/tq?key=1lZDOwszmh0LTv1EiiCkRZQAnrFnpobtaSshmQvgtWbA

The result will be a json document which you can parse with B4A:

{"version":"0.6","reqId":"0","status":"ok","sig":"941982251","table":{"cols":[{"id":"A","label":"","type":"string"},{"id":"B","label":"","type":"string"}],"rows":[{"c":[{"v":"Type"},{"v":"content"}]},{"c":[{"v":"string"},{"v":"Hello B4A"}]},{"c":[{"v":"name"},{"v":"Stefan"}]}]}}


see http://basic4ppc.com:51042/json/index.html
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…