Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch data from Google Spreadsheet

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.

like image 802
Mahir Avatar asked Jul 23 '12 09:07

Mahir


People also ask

How do I pull data from Google Sheets to excel?

Click on the + icon and select Import. A variety of platform selections will pop up, including Google Sheets and Microsoft Excel. Select Google Sheets from the options. In the popup window, select either the Google Sheets file from your drive that you wish to import, and click Continue.


2 Answers

Google has a REST api for spreadsheets and native apis for many languages.

https://developers.google.com/sheets/api

like image 162
LDAdams Avatar answered Oct 06 '22 00:10

LDAdams


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/

like image 29
mbrenig Avatar answered Oct 05 '22 23:10

mbrenig