Fetch data from Google Spreadsheet - google-sheets

how can I fetch data from a google spreadsheet? It's not something like embedding a google doc on a webpage. Suppose, you have a table consisting of 10 rows and 10 columns at google doc. Now, you created a 10x10 table on a PHP webpage. Now you will show the respective values of the cells from that google doc to your php page. It's just like fetching data from a MySQL database and showing them on your web page. But here instead of using a MySQL database, I want to use Google Doc and do the rest. But how can I do it?
Thank you.

Google has a REST api for spreadsheets and native apis for many languages.
https://developers.google.com/sheets/api

If your data is the typical table layout (rows of data with a header row) - then you might find this python library helpful:
http://sheetsync.readthedocs.org/en/latest/

Temboo provides an SDK library that makes it pretty easy to interact with Google Spreadsheets in multiple languages, including Java/Android, PHP, Ruby, Python, Node.js, and Objective C. There's also an online tool for experimenting with different Google Spreadsheet API calls. Take a look at https://www.temboo.com/library/Library/Google/Spreadsheets/
(Full disclosure: I work at Temboo)

Related

want to update google sheets from a streaming database...data has to be readily available for querying/reporting

querying a student database with columns in google sheets. currently the data is updated overnight but want to change the source to a streaming source so that data is more dynamic, more current reflecting reality versus 'yesterday's news'.
You did not provide enough details for a specific answer. Google Sheets has an API you can use for reading and updating data (Java sample, for example), and depending on your source of data you might have a built-in integration.

I need to integrate Google cloud translation API to google sheets using macros

I Cant find any workable solution. Can anyone help? Need to make translate from 1st sheet in one doc to the second. About 60.000 changeable rows.
You can use the Google Translate function directly in your sheet
If you want more advanced/customized calls, I recently wrote an article where I use the current user credential and I call a Google Cloud API (not the translate, but the principle is the same)

Google promises that Fusion tables can be imported into Google Sheets but how?

Google states that fusion tables could be imported into sheets and turned into maps but I cannot find any information on how to import Fusion tables nor how to turn them into maps similar as in Fusion Tables. Please help!
Googled for hours...
One option is to download the Fusion Table as CSV. Then import the CSV into Google Sheets.
You can then use this Mapping from a Google Spreadsheet tutorial to learn how to create a map from your data.
From https://support.google.com/fusiontables/?hl=en
Google Fusion Tables will not be available after Dec. 3, 2019. Learn more
From https://developers.google.com/apps-script/advanced/fusion-tables
Warning: The Fusion Tables API that this service enabled was deprecated on December 11, 2018. You can continue to use the advanced service until December 3, 2019, when the API will be fully shutdown. See the Fusion Tables help center for more details.
Anyway, the above link include code samples. I think that this links will help you on your quest is you still are interested on using Fusion Tables.
You can use the Fusion Table Archive Tool and it copies your selected google fusion tables (to your google drive) into google sheets. I am doing it now. I hope it works. Make sure you download your fusion table in .csv format as a backup.
Also, if you are looking at a map in fusion tables then you can download the fusion table in KML format and then you can open these KMLs in google earth and it will also show the bubble messages that you had in google fusion table maps when you click on the points on your map.
Personally, I am planning to write some python programs to bring up my maps in the future using a library called Folium that looks like it can display maps easily. I will use python to update my data in my .csv files and add new rows (eventually I may migrate to a database of some sort like SQL, still mulling this over.)
There is an add-on for google sheets called "mapping sheets" that can build a map from your data in sheets. It might be useful.
https://fusiontables-archive.withgoogle.com/export
https://python-visualization.github.io/folium/quickstart.html
https://gsuite.google.com/u/0/marketplace/app/mapping_sheets/736233853391?hl=en&pann=sheets_addon_widget

Talend: use Google Spreadsheets as Input and Output

I'm using Talend for several ETL-jobs. Main focus on inserting and updating data defined in local Excel files to Salesforce. Excel and Salesforce are used as Input- and Output-Connections massively.
This works like a charm!
Now instead of Excel I need to use Google Spreadsheets as data inputs/outputs. Just manually download as Excel isn't good enough. Reason: I need a highspeed repeatable process executed thousands of times bi-directional. Uploading/Downloading XLS/CSV is not an option.
As an unfortunate, my researches concluded that there is NO Google spreadsheet connector available. I found this legacy-project which seems to be abandoned: https://code.google.com/p/google-talend-components/ - it is outdated from Talend-side as well as from Google (old API versions).
One other thing I've seen, is that Talend comes with Google Big Data Support: https://www.youtube.com/watch?v=BK6G3sTmwVE - Also Google Big Data might be somehow connectable to Google Spreadsheet - but I wasn't able to figure out how. Is this easy or hard? How to start? What to read?
I need to know if there is any viable approach to read and write data with Talend from and to Google-Spreadsheet.
Alternatively is there an other ETL-tool like Talend which has connectors to Google Spreadsheet AND Salesforce out-of-the-box?
Is there a direct google docs connector in Talend, no. But you can do what you are looking to do if you think of the problem a little differently. It sounds like you need to read and write to spreadsheets then upload/download from google. Lets take each problem separately.
Upload/Download
Google storage. If you need to upload and download files from google Talend has excellent integration with their API. As you mentioned, Talend --> Big Data has components to interact with Google Storage. This type of storage is primary meant as back end storage for an application.
In Talend under Cloud-->Google Drive there are components to upload and download from Google Drive. Google Drive is primarily meant as Chrome app and has direct integration with Google Docs.
Writing to Google Docs
Regarding your need to interact with google docs, you do not need any special components for this. Google docs can utilize csv and Excel formats. If you create and modify your documents in Talend using the standard file interaction components ( delimited, Excel, etc.) you can upload and download these documents using one of the two methods I described above (Google Storage or Drive) depending on what type of storage you are using.

Using Google Spreadsheet as DB for apps

I want to use Google spreadsheets to store data online so multiple people can enter and maintain data, then publish or export (csv, xls, ods) the sheet for their application. What is the easiest way to process the sheet? If the data can be accessed as a link the updates could be immediately reflected in the client's app.
This article Data Scraping Wikipedia with Google Spreadsheets discusses using Google spreadsheets as an application platform.
It already has features that allow you to share the spreadsheet with multiple editors, as well as the ability to define forms that you can invite people to fill out who's results will be entered into the spreadsheet as a row.
Just in case its still vaguely of interest 5 months later, there is a SQL-like wrapper language for Google Spreadsheets at:
http://gqlx.twyst.co.za
Its very much an alpha release - but maybe its of some use or perhaps the code could give you some ideas.
I think if I am clear on your requirements, you want to store your data online in a Google Spreadsheet where multiple people can access that right? Then you want an app to use that data? Correct me if I am wrong.
It is possible to have Google spreadsheet as a database and the client app can directly access that data through APIs - spreadsheet APIs . If you want a simple link where people can go and update - you can also have a web app using google apps scripting. very simple to use and would solve your purpose too , why to export your data to ods, xls, csv, make your app directly over Google Spreadsheet. Would be maintainable too.

Resources