Sheets API V4 Spreadsheet View Properties - google-sheets-api

I'm trying to zoom into a google Spreadsheet using an API call. Is this possible? I would also like to enable full screen from another API call once I dynamically create a spreadsheet, but I can't find it in the documentation, anyone knows how to do this?

Currently, the functionality that lets you Zoom in and out the spreadsheets is not supported in Base Script Services (Class Ui). Also, you have a similar SO post, have a check.

Related

I insert an image in Google Sheets as a blob rather than link it with a URL

I want to insert a blob object (.jpg image) with Google Sheets API.
Does Google Sheets API allow for blobs inside the spreadsheet's cells?
I know that inserting the image directly into the spreadsheet by hand without using API is possible.
In the current stage, unfortunately, the image blob cannot be directly put into Google Spreadsheet using Sheets API. So, it is required to use the workarounds. In this answer, I would like to propose the 2 workarounds for achieving your goal.
Pattern 1:
In this pattern, IMAGE of the built-in function of Google Spreadsheet is used. The flow is as follows.
Upload the image to Google Drive using Drive API.
Share publicly the uploaded image using Drive API and receive the URL of the image.
Put a function of =IMAGE("URL") to a cell using Sheets API.
By this flow, your goal is achieved. If you can know the direct link of the image, you can directly use only the 3rd flow of the above flow.
Pattern 2:
In this pattern, the image is inserted into the Spreadsheet using Web Apps created by Google Apps Script.
Upload the image to Google Drive using Web Apps.
Put the image blob into the Spreadsheet using Web Apps.
By this flow, your goal is achieved.
References:
IMAGE
Web Apps

How to get the currently selected cell/range with the Google Sheets API?

Same question as this one, but when using the Google API, not Google Apps Script. I use Java but an illustration in any language or REST would be good.
Answer:
You cannot do that, since the spreadsheet itself doesn't have a selected range. A certain user may have selected a range, but that information is not available to the API (see spreadsheet resource for further reference).
Explanation:
In Apps Script, bound scripts get the special privilege of using methods (e.g. getActiveRange()) that provide information on what the current user has selected (see Special methods).
But even using Apps Script, this cannot work in standalone scripts. Let alone using the API.

Is it possible to create google sheet template programmatically?

Is it possible to create google sheet template programmatically? If yes how to do it? I know I am suppose to check API documentation but I am not a technical person.
I don't think this is supported as of now.
I searched in Introduction to the Google Sheets API docs for a guide on how to do operations with Sheets API but have not found an explicit guide on how to do this.
You can also check Spreadsheet using Google App Script but there is no mention as well.

Can you create Google Forms from Google Docs in an application?

I am thinking about app that will use google form and I need to create forms from that app. Is there a way how can I create form in google docs without using website but through some api or some other way?
I can offer an idea for a solution using Google App Script.
Since the beginning of 2013 you can create new forms using the App Script Forms Service API quite easily.
var form = FormApp.create(title)
.setDescription(description)
.setConfirmationMessage('Thanks for responding!')
;
The problem now is how to get that App Script running from your non App Script code.
You can use App Script to create a Web App that reacts to HTTP GET requests.
So putting it together, you may be able to create an App Script Web App that reacts to a GET request and when it gets the right URL parameters, it creates the form.
(Nov 2020) Yes, it is possible to programmatically create Google Forms. You can do it with Google Apps Script using its Forms service. You can also extend the code to read in the contents from Google Docs (with Apps Script's Document service) and use it for the creation of Google Forms.
I created a Google Workspace (formerly G Suite) Add-on, which you can think of as a Google Docs extension, called GFormIt. Its original purpose was intended for teachers to write exams/quizzes, possibly with answers, in Google Docs, then automatically convert them to Google Forms to distribute to students who submit their answers into Google Sheets (the destination for Google Forms submissions).
Furthermore, if you (the teacher) provided answers to your test questions, GFormIt would also auto-submit your answers to the Sheet as if you were a student. If you do that, and use a tool like Flubaroo to grade the exam, you could designate your row in the Sheet as “the answer key.” You can learn more about how it works, including viewing a short video, at the GFormIt page linked above.
This Google Docs add-on, along with others for Google Docs, Sheets, Slides, Forms, etc., are all certified/validated by Google and available for free to anyone from the Google Workspace Marketplace. (However, your admins may have to grant permissions for you to try to install them to your corporate Workspace account.) If interested in building your own add-on, please see the developer documentation and perhaps some of my introductory videos to get started, the most relevant being the one linked to at the top of this answer.
Apps Script is a serverless Google technology, meaning you write your code (using JavaScript) in the browser, and it is hosted by & executed on Google servers. If you wanted to create your own web app (and hosted anywhere), you would have to wait for a Google Forms REST API which does not exist at the time of this writing. (If we ever launch one, you'll find its documentation at https://developers.google.com/forms along with the others like Sheets https://developers.google.com/sheets, Gmail https://developers.google.com/gmail, Drive https://developers.google.com/drive, etc.)
Earlier this year (Mar 2022) the new Google Forms Api graduated from Beta. It is more powerful that the previous versions and caters for two main use cases:
Automated form creation and editing: Enables automated form creation
and editing. Enables rapid form generation from large volume question
banks or other data backends.
Reaction to Form responses: The API also enables developers to build
automations for acting on incoming responses. Examples include
developing real-time dashboards or visualizations and triggering
business workflows based on response data.
We have used it to build an integration that Creates documents and slides each time a form is completed: www.portant.co/google-forms-to-docs and it works really well.
I think the other key use case looks like it would be a good fit for you and others looking for a solution like this.
Cheers, James
Sorry, the API doesn't support programmatically creating forms.

Facepile with graph api

I want to display the list of the user's friends who made an Open Graph action, like cooking. I can do this with Facepile, but how can I do this with the Graph API in order to control how it's displayed?
I can't find the corresponding Graph API call. Is there a simple way in order to avoid multiple Graph API calls?
Facebook should make api for that, but there is not way currently. I asked the technical support in facebook.com for that. They have a plan to implemente in FQL, but not yet.
So, facepile is only way until now. Check http://developers.facebook.com/docs/reference/plugins/facepile/ and check other type of codes like javascript SDK or iframe.