I have a form that I host . To meet my clients needs I must post to specific url .I wuld like to be able to post to a dattabase or google spreadsheet at the same time so I can track results
What I would do is log the data in the database, and then provide a feed for the Google Spreadsheet.
Google Docs Spreadsheets are capable of loading various formats of data over HTTP. You can provide a feed of that data, and the spreadsheet will automatically update as new data is available.
For example, in your spreadsheet:
=importHTML("http://www.google.com/search?q=define:live", "list", 1)
Example from: http://googlesystem.blogspot.com/2007/09/google-spreadsheets-lets-you-import.html
Related
I'm currently developing a php page that will get spreadsheet data and display it in a datatable. I have done so by publishing my spreadsheet and getting the JSON object through spreadsheet url/key.
I have been successful in doing so :
Now, I have been requested an enhancement, I need to change the functionality of the 'print pdf' button to actually get the row data and create and populate a google doc. I'm thinking that I would need authentication for that and the implementation of accessing the google spreadsheet would change. Could anyone give me a nice example cause I am fairly new with google api and php in general.
I tried to read samples from developer.google but I'm having trouble understanding them.
Thanks a lot!
I want to submit a form from my web site over to a Gscript file on my Google Drive and have it take the form values, and generate a PDF file and email it. I have this working already using Google Forms, a Google Sheet, but the goal here is to have the data itself stored in a MySQL relational database where data is not duplicated, and as we fill in our form data will auto-populate if it already exists, or we can choose it from a list on the left to fill in pertinent informaton. This is for a donation receipt system for a nonprofit organization.
The key for us is to separate donor information from donations. We want to be able to store our donor info, with things like birthdays, anniversaries, and other miscellaneous information so we can send out birthday cards, etc but not store that data over and over again because they made several donations.
Is there any way I can move the form itself over to a secured portion of my own server, and submit the data over to my .gs file that already parses the data and puts it into the PDF document, Mailchimp, and backwards into my MySQL database, and sends the appropriate emails. I could cut out so much of that extra work on the Google side, and do all of it except for the PDF and email from my own server, and handle the rest from Google if I can just submit the data as a POST or GET request or to JSON to the .GS script.
I cannot find anything about it anywhere.
Apps Script has lots of reserved function names. Two of those reserved function names are:
doGet()
and
doPost()
Both of them are triggers, or event handlers that get triggered when a GET or POST request is made to the published Web App URL. Data can be passed to Apps Script with the request. Here is a related Stack Overflow post Link to Stack Overflow Call GAS from external source
Stack Overflow Question
Hi all and sorry for my bad English. My task was to get data from sheets (tables) Google docs.
I export data from Google docs using URL with params:
https://docs.google.com/feeds/download/spreadsheets/Export?key=[file_id_here]&exportFormat=csv
Retrieve data from the file has no problem, but then I found out, that the real lists are restricted and this is where the problems started.
Instead of CSV file, Google returns authorization.
My question is how to organize the connection to Google api with token client if the client has the right of access to the document, the document data is displayed , otherwise, "You do not have permission to view the document!" message appears. OR Maybe it is possible to add parameter(client token) to URL, though this is not possible.
Any help appreciated.
I am using a MySql database and google spreadsheets together. Each record in my MySql database has a corresponding google spreadsheet for aditional datas. On my website I have displayed the datas and included the spreatsheet by iframe.
From my website I edit and delete the records by php-script. After deleting a record from my database I go to google drive an delete the corresponding spreadsheet.
Is it posible, to delete the spreadsheet as well with the same php script from my website? If yes, how can I do it?
Yes, definitely you can. You may create an Apps Script and publish it as a webapp. Now you can call the wepapp URL from PHP using curl and pass the ID of the spreadsheet to the Weapp. App will take the ID and do the required action. Webapp code will look something like
function doGet(e){
var ssId = e.parameters.ssid;
var file = DriveApp.getFileById(ssId);
DriveApp.removeFile(file);
return ContentService.createTextOutput('File removed').setMimeType(ContentService.MimeType.TEXT);
}
For more details, check Apps Script Content Service.
https://developers.google.com/apps-script/guides/content
I'm new to PHP programming language.
Currently, i want to develop a page that displays something like an excel spreadsheet (with self-defined column headers).
It allows users to key in data onto the 'spreadsheet' and when they submit it (maybe a submit button at the bottom), the data will be saved into mySQL database.
May i know if this can be done?
Use google spreadsheet API:
The Google Spreadsheets Data API allows client applications to view and update Spreadsheets content in the form of Google Data API feeds. Your client application can request a list of a user's spreadsheets, edit or delete content in an existing Spreadsheets worksheet, and query the content in an existing Spreadsheets worksheet.
http://code.google.com/apis/spreadsheets/data/1.0/developers_guide_php.html
Yes, it is possible. e.g: google docs and some other online editing/office applications. But you may need to know more than php.
try something like zoho sheet, getting data into your database will have to use something else though
https://sheet.zoho.com/