how to make google sheet as question for my job? - google-sheets

I made a google sheet and i want to make it as a question. I need this all the data in this sheet recorded in a new sheet after people answer it and I want the table empty for next user to answer the question. And where can i get the response?

What I suggest is to make a copy for each person who is going to use it.
When you share your spreadsheet with them you change ending of your URL.
Istead of:
https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXhere is youd document ID XXXXXXXXXXXXX/edit#gid=1535248610
You send them
https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXhere is youd document ID XXXXXXXXXXXXX/copy
This way everyone will fill the different copy of the table and have to later share it with you.
Different option is to use a script that copies content to the new file.
You also can use Google form for this job.

Related

Is there a API call to replace a sheet?

I was wondering if there is a API call for Google Sheets where I can delete all cells in a given sheet and paste/replace with a new data. I have the new data in the form of its own sheet.
thanks!
Update cell values with Google Sheets API
Since you mentioned that you need an API call for this, I think your way to go is to use the batchUpdate method from the Google Sheets API as it is the closest thing to what you are looking for.
With the batchUpdate method you can send a UpdateCellsRequestin order to replace the information from the cells you are looking for. I will leave the official documentation below so that you can check what I just mentioned.
References:
Method: batchUpdate
Reading & Writing Cell Values
UpdateCellsRequest
For a large existing file, it seems most expedient to delete the file and create a new one with Apps Script.
For delete, you can use DriveApp. Look for methods such as .getFileById(). Or, if you prefer to programmatically search for a filename in a folder, look for .getFolderById() and .getFilesByName(). Once you get the file object, you can either use Drive API's .remove() as shown in this answer or use DriveApp's .File.setTrashed. But note the latter moves file to trash bin, not literally remove from drive.
For file creation, you can use Advanced Drive Service. see this answer for exact steps.
As for populating the new sheet, the OP implies that step is already understood. (No particular data format was provided.) So we are done!

Google sheets integration with Zapier: How to create a new spreadsheet based in a model

My workflow is the following:
When a new document is collected by my system I create a row in a Google Sheets to make a list.
I need to create a new Google Sheets when each row is created. And that Google Sheets must follow a specific template.
I tried to do that with Zapier and that works perfectly for blank sheets, however I need to use a template, I have formulas inside. The template is like this by the way.
Can someone help?
David here, from the Zapier Platform team.
I messed around with this a little bit and I don't believe it's possible using Zapier at this time. Because of the way our integration works, we need the headers available so we can place data.
I see that there's a "Create Column" action, which you might be able to use use in conjunction with a bunch of "create row(s)" actions, but I'm not positive it would work.
Sorry I don't have better news here. ​Let me know if you've got any other questions!

Archiving data in google sheets - multiple rows and multiple columns

Hello everyone I am attempting to modify a script that I found in this post (Archiving in Google Spreadsheets with Date Using Apps Script). The goal is to set it up on a time trigger/button to a specific range of cells into a sheet within the same workbook. When it is archived it should overwrite the previously archived data within the range of cells on the "archive" sheet. I have played with this script with this suggested script from this post and removed the "delete" and "priorities" components of the action, but am still having problems getting it to simply overwrite what is already there. I will continue to work with it withing my limited knowledge as I continue to learn, but would greatly appreciate any help or tips. Or if their is a preexisting code that would serve the purpose that I have missed I would love to hear about it.
Thank you for any insight you can provide and for all the help in the past.
*and thanks to Jad and the User1786546 for the original posting.
I had a quick look at the script post.
If you wanted it to delete the archive data before writing to it, you might need to clear the contents of the sheet first before writing the data.
targetsheet.clearContent();
This will clear the whole target sheet, (the target sheet is a variable in the script you linked to, this name can be changed), including column headers.
If this is undesirable, then you may wish to use
getRange().clearContent();
Please see this link for more info.
https://developers.google.com/apps-script/reference/spreadsheet/range#clearContent()
If you still need further help, try sharing a dummy spreadsheet, with realistic data and sheets.

Query data from Google Spreadsheet generated by Form

Currently we're having a request to integrate the Google Form functionality into our system. I'd done some searching on the web, and found that there's no way we can change the post processing of a Google Form unless we do some heavy customization using 3rd party tools.
Thus i have an idea that, when someone fill in the Google Form, he/she will need to fill in a 'user id' in the form. This will be collected as a field in the Google Spreadsheet generated by the form.
In my back end application, i would query the spreadsheet and look for the user id field input by the user. Then i would be able to know whether he/she completed the form or not.
I'm trying to look at the Google Docs API for the spreadsheet and found that there are list-based feed and cell-based feed but i'm not sure which one can achieve what i want to do. Anyone has experience in this can shed a light?
Thank you
Think of a list based feed as being like SQL. You can read rows, insert rows(at the bottom), delete rows and update rows. - you can only store data, not formulas. In contrast, A CELL based feed lets you read and write to cells, any cell, using the cell reference (R1C1 style). CELL FEED give you more control, and includes batch updates.
some sample CELL FEED code is here:
http://code.google.com/p/gdata-java-client/source/browse/trunk/java/sample/spreadsheet/cell/CellDemo.java?r=51
Another option is too use google apps script, this is maybe less work if you just want to extract data. The html service is probably the tool for the job https://developers.google.com/apps-script/html_service - as you can dont need OAuth to do the read.

start a window with a list of documents when clicking in a cell?

I would like to create a template which I would use to order my applications to find a new job.
For each line, I will need a contact (from my contact list), a document (from my documents list) and a task list.
I want to input a hyperlink in cells to each of those documents.
I am searching for a way to display a pop-up, a frame, whatever with the list of documents or contacts from my google account.
The use would choose (click) for the good one.
Then, the hyperlink to the chosen element would be pasted in the cell.
So, here is part of my answer :
I have to use google scripts in spreadsheet to perform this kind of operations .
There is a script called Contact manager in the script gallery that allows you to retrieve contacts directly from google.
Here is a hint about checkboxes in google spreadsheets :
https://sites.google.com/a/simpleappssolutions.com/building-powerful-web-applications-in-google-apps-script/check-box
Now, What I have to do is concatenate all that :)

Resources