I need use some functions in many sheets on Google Drive. Several users will use the functions of this script.
In excel I have got personal.xlsb with macros to all files.
Have You any solutions to this problem?
You may check in this documentation the list of classes and methods you may use in Google Apps Script connected in your Google Sheets. The Spreadsheet Service allows scripts to create, access, and modify Google Sheets files. See also the guide to storing data in spreadsheets. Here's the documentation on how Apps Script can interact with Google Sheets.
There's also a page about Google Sheets Macros that lets you record macros that duplicate a specific series of UI interactions that you define.
Hope this helps!
Related
Requirement: Auto-generation and completion of a Google doc based on selections made by filtering options in Google sheets
Step-by-step:
There are x options listed in a spreadsheet.
I reduce them to the number I need via filtering.
I then have these options + the expanded details automatically added to a google doc template I've designed.
As an unexperienced programmer, it's very likely that the most convenient way to do something like this is by using Google Apps Script as it has services that help to extend Google Sheets and Google Docs among other Google apps. This service use JavaScript as programming language and it's possible to create and manage the script by using a web browser.
Experienced programmers that don't want to invest too much time on doing this might also find convenient to use Google Apps Script, but they might prefer to use the tools used for other projects might use CLASP or the Google Apps Script API.
Besides using Google Apps Script this could be done by using Google Docs API, Google Sheets API, Google Drive API and Google Cloud.
I have been given a task, where there is a group of people in a excel spreadsheet, in which the owner can mark if a person has arrived or not. Which can be done in excel by using VBA All Sorts. But I don't how to implement this in Google Sheets. Is there some workaround to this?
I I have tried looking at the documentation for google-script-apps, and various how-to guides of designing a userform for a Google Sheets document.
I am afraid, that I can't provide some code as I haven't a clue of how to implement VBA All Sorts in Google Sheets.
what you should look into is Google Web Apps. You can create an HTML page with Google Spreadsheet as database. You can create the HTML page with all the options you want and then write/read the data from Google Spreadsheet by calling Javascript functions in the HTML talking to google.script.run.XXXX() Google Apps Script functions.
I have been looking for a way to interact with my google sheets (and other services) from Excel (and other desktop applications).
For example:
I get a report from a work system and my boss asks me to update the information in the google sheets so that our site is up to date with the latest information.
What would be great (and easy for me) would be to use a VBA script in my spreadsheet to turn all my data in http requests and then do the heavy lifting with Google Apps Script in the cloud and finally updating the Google Sheets with the associated API.
When I look at the oAuth2 playground I can't find a way to enable Google Apps script, as I have successfully done so with other APIs.
(to be clear, I don't want to do oAuth2 with in GAS - which is a lot of the other questions that get raised)
Is this a hard problem or is there a solution?
There is currently no way of calling a Google Apps Script from an external program. You do have a few other options:
Import the relevant data into Google Sheets manually and use Google Apps Script to process it as needed, possibly making use of time-based triggers to handle the processing automatically.
Use the Google Spreadsheets API. Unlike Apps Script, this API is built to be called from other programs and can manipulate Google Sheets. However, it is a bit more difficult to use than Apps Script. Once data has been moved into a Google Sheet, a separate Apps Script can be used to manipulate it.
Is there a way to run a script against Google Drive to identify which docs and spreadsheets, etc. have Google Apps Scripts associated with them?
I have thousands of documents and spreadsheets, many with scripts. I want to identify all the files with scripts in them so that I can audit the code.
It is not possible through scripts but you can go to your Google Account security page to see which documents / sheets have additional access to various services. These files are more likely to have scripts associated with them.
Link: https://security.google.com/settings/security/apppasswords
I have now written a number of different functions in Google Apps Script that I am using on a growing number of Google Spreadsheets.
Every time I make a small edit to one of these functions I then have to go into each spreadsheet and make the same correction.
Is there a way to "import" the functions to each spreadsheet so that I only have to edit the one "master" function and it is then updated on every spreadsheet?
Google has just release a new feature called Libraries, it is an elegant way to do what you're asking for. Here is the documentation, read it attentively because it's a multi-step process.
See this page for how to create and share functions in your sheets using Google Apps Scripts. The scripts are written in javascript and there are some limitations on how they can be used.
https://developers.google.com/apps-script/guide_writing_scripts#CustomFunctions