I want to embed a Google Sheets spreadsheet to my website. I would like it so that users can come to my website and they can see and interact with the spreadsheet. The spreadsheet also contains some formulae . For example there is a
width, height , fabric , price
column
in this sheet . Fabric is a drop down and it contains some types of fabric with different prices. The formula for calculating the price is:
height*width*fabric value
So whenever user adds width, height, and selects the fabric then it outputs the corresponding value in the price field .
So I want to embed this google sheet in my websit, so that the user can use it to calculate prices without saving to original spreadsheet.
I have a php
website. If we can't do this using Google Sheets, then is there any way to upload this excel sheet to my website and do the same operation?
Please help.
I think I understand what you mean but I'm not entirely sure. From what you said in the question I am assuming that:
Ok, so I think you have 2 main options here:
Option 1: embed spreadsheet with permissions
I realise that you have tried this option and that it is not working. Please see option 2. This first option involves taking the spreadsheet that you have already made and putting some editing permissions on it. I'm guessing that in your spreadsheet you have a cell with data validation on it (to create the dropdown menu. If not, can you please say how this is done) and that this is where the user selects an amount to input into your algorithm. If this is the case, then what you want to be doing is this:
Option 2: Javascript form
I have found some HTML online and I have added some features to it to suit your needs. Please run the code below and see if it will work for you, and if it will, copy it and paste it into an HTML snippet section on your website builder. To change the fabrics and prices, just go into the code and edit them in the '' tags. If you need help with this please just ask.
I hope this all works!
penguin_k
What I think you should do is simply make a COPY of your template or base spreadsheet for each user, so that it won't matter if they save it or not: each user would work on his own copy.
Eventually track down the copies so you can trash them on a regular basis (garbage collection).
Look at the
COPY
method of Google Drive's API:https://developers.google.com/drive/v2/reference/files/copy
Example code in PHP:
Note that you need permissions, but on the server-side. Just do not use a critical account, so you stay safe in case of server compromission.
This question is very much vague. Google Cheats is neither a programmable or API oriented service. Your need is a script which provides all the functionality of Excel but should not allow the CTRL+S.I mean saving the changes.
Here are libraries for making web based SpreadSheet Applications:- [Please see this link] https://jspreadsheets.com
Handsontable
seems quite promising, but there are lots of libraries available you have to give a search. https://jspreadsheets.com/handsontable.html