Converting Google Form Responses to Google Sheets as a Viewer - google-sheets

Is there a way that I am able to convert a list of Google Form Responses to Google Sheets as a viewer? I have permission to view previous responses, but I am not the owner of the forms.

if you have View access to the spreadsheet you can create a new spreadsheet:
sheets.new
and enter this into A1 cell:
=IMPORTRANGE("URL"; "A:Z")
where URL is the address of the spreadsheet you have View rights and A:Z is the range you want to import. you can even specify the sheet name like: "Sheet1!A:Z" or "Form Responses1!A:Z"

Related

How to insert an embedded sheet via Google Docs API?

I want to insert an embedded Google Sheets table into a Google Doc via the Google Doc API. I had hoped that I could do this via an EmbeddedObject. The definition of EmbeddedObject includes a field for LinkedContentReference, but despite the generic name, a LinkedContentReference object seems to refer only to a Sheets chart.
Is there a way to embed a Sheets table in a Google Doc via API?
I did notice that Google Sheets offers a Table Chart as a chart type. This may be an effective workaround.
You need to insert the sheet table as an inline image
An InlineObject contains an EmbeddedObject such as an image.
Now, when you publish a Google Sheets, you have the option to publish it as pdf, but not image. This mean that you would need to perform an additional step of converting the pdf into a supported image format.
Alternatively you can obtain (and save on your Drive) the Sheet as a thumbNail by performing a Files: get request on the Sheet and setting fields to thumbnailLink. Mind that the thumbNail contians the whole sheet view - not only the data range.
Important:
When performing a documents.batchUpdate request InsertInlineImageRequest, you need to specify the uri in the format
https://docs.google.com/uc?export=view&id=PASTE_HERE_YOUR_ID

How to get single sheet from multisheet workbook in Google Sheets

So I have shared a google workbook and I have created a key and so I can retrieve the structure of the workbook with the following link
Google Sheets - Copy of Guardian University Guide 2018
and in the results I can see the sheets in an array, so first element in an array has sheetId of 1544561606 so I presume somehow I can form a second url with this sheetId as well as original spreadsheet id and get the contents of the this sheet but the documentation is sparse IMHO. THen I can do the same for all the other sheets. I just can't find the correct url format. Please help.
This is version 4.0 of Google Sheets API.
From your endpoint, the sheet name of the sheet ID 1544561606 is "Institutional". You can retrieve the sheet data using this sheet name. The endpoint is as follows.
https://sheets.googleapis.com/v4/spreadsheets/1nDSd38lIQj_aTWDRPJ-aPybR0NwFdQ8GLSDJM0-QaR4/values/Institutional?key=AIzaSyBUHA34c7FmNLut1V7Pe3lIJTk3pX39J6E
Reference :
spreadsheets.values.get
If I misunderstand your question, I'm sorry.

How can I get single sheet from a spreadsheet collection from Google Sheets with Google Sheets API v4?

I'm trying to build a webapp based on Google Sheets. I'm a little bit confused with the API. I have a spreadsheet which is shared with me by Drive and contains 2 sheets. I can get the first sheet with
GET /v4/spreadsheets/{spreadsheetId}
Returns the spreadsheet at the given ID.
endpoint. But I couldn't figure out how to get the second sheet. Is there a way I can get spesific sheet from a spreadsheet?
The problem in here is when you are using ranges parameter you have to specify the sheet title with A1 notation syntax as described in this document: https://developers.google.com/sheets/guides/concepts#sheet_id
I was using the ranges parameter and using the A1 notation correctly but I wasn't specifying the sheet title. In that scenario the default sheet is the first one. If you want the get another sheet other than the first one you have to specify the title, like this:
https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}?ranges=sheetTitle!A3:F20

Is there a way to list all sheets on a google spreadsheet using native functions?

I create many dashboards on Google Spreadsheet, which are basically a spreadsheet containing a bunch of sheets with all sort of different data. Some of these spreadsheets can have up to 30 sheets or more.
I want a way to list the name of all sheets in a spreadsheet on a column using native functions.
I know this could be easily done with a custom function. However this would bring some complications regarding the workflow in my company.
Is there a way to accomplish that without using custom functions?
Thank You very much!
This works in Excel, so if you are able to export your workbook and save it as an Excel file rather than Google Doc this will work.
Go to your "Name Manager"
Create a 'New' name and call it "Sheets"
Insert this formula into the 'Refers to' box =TRANSPOSE(GET.WORKBOOK(1))&T(NOW())
Now insert this formula where you want the list of Sheet names =IFERROR(INDEX(MID(Sheets,FIND("]",Sheets)+1,255),ROW(A1),1),"")
Drag the formula down so A1 progresses (A1 represents the sheet number that you are getting the name of).
Source of solution

data from specific google spreadsheet tabs

I know how to query data from google spreadsheet with the general share link, but I want to pull data from specific tabs in that shared workbook. How do I do this?
It is not clear from your question how you are querying a spreadsheet (there are several ways to do it).
If you are using spreadsheet data source url (e.g: https://docs.google.com/spreadsheets/d/{ss_key}/gviz/tq?tq=...), then you can add gid or sheet url parameters to specify which sheet in the spreadsheet to query by its id or name:
https://docs.google.com/spreadsheets/d/{ss_key}/gviz/tq?gid=0&tq=...
https://docs.google.com/spreadsheets/d/{ss_key}/gviz/tq?sheet=Sheet1&tq=...
You can get the gid number of a sheet from the spreadsheet's url when it is open in your browser. More info here: https://developers.google.com/chart/interactive/docs/spreadsheets#Google_Spreadsheets_as_a_Data_Source
Note: data source url examples above are for new google sheets. If you are still using old sheets, the url format will be different: http://spreadsheets.google.com/a/google.com/tq?key=ABCDE&tq=.... The documentation link above still uses old sheets url format.
If you are querying your spreadsheet via QUERY() formula in another sheet, then just specify the name of the sheet you want to query in the data attribute of the function:
=QUERY('Example Data'!$A$2:$H$7, "select A where (B<>'Eng' and G=true) or (D > "&A2&")")

Resources