Chrome app and connecting to google doc - google-chrome

I want to start looking at using chrome apps as a possible IT solution. I used this tutorial to create a quick app:
https://developer.chrome.com/apps/app_codelab_basics
My next step is to connect to an external data source, where multiple users could access (read/write) to the same source. Is it possible to read/write to the following, and if so, are there any tutorials:
Google Sheet, stored on google drive
An access db saved in google drive
An Excel file saved on google drive.
Thanks

Have you, by any chance, tried using Google Apps Script for this.
Here's a simple tutorial:
https://zapier.com/blog/google-apps-script-tutorial/
Here's the complete API documentation (small examples included):
https://developers.google.com/apps-script/reference/spreadsheet/
I have configured fairly complex workflows by just using Google Apps Script with various Google Apps.

Related

Using external Web IDE in Google Appscript

I am creating an app for my company.
The thing is, I work on a governmental company and have several restrictions. I can use the google services including apps scripts and cloud services (the free services only) but ideally I can't install any IDE locally so I a web IDE would be the ideal solution.
But I am having a hard time to understand how can I export/import my scripts, I mean, I can't even find them on drive (I can find my project and that's it).
Some web based IDE's can be authorized, and some other will be blocked, this one: https://shiftedit.net/ seems to work.
I am just not understanding it?
Google Apps Script project files (.gs and .html) are not files that can be found in the Google Drive user interface. To export / download these files you could use Google Apps Script API, CLASP, Google Apps Script GitHub Assistant Chrome extension.
P.S. I just found https://github.com/dev-container/gas but have not tried yet... it' for working on Google Apps Script projects with VS Code and GitPod containers.
Related
How best to develop Google Sheets scripts and Git versioning
Is it possible to upload a .gs file to an apps script project of a copied google doc?

One question survey app Google Apps Script and Google Sheets with user management

I have to do a little bit of "crowdsourcing" for my work and it would consist in a very simple web app where a user can register/log in, and then be taken to a page where a picture is shown to a user and submit a number.
I'd like to be able to set up a few rules to choose which picture the user will see (so he won't have to answer twice the same question and also to allow some overlap between users to compare their answers).
We can assume that I have a google sheet with a list of images URLs that can be accessed and that I would like the answers to be populated there.
I figured that this tutorial would be a good start since it handles user creation and management and user can submit ideas :
Creating a CRUD Web App with Google Sheets
That being said I'm a bit clueless, I've tried to look for sample scripts deployed as web app but it's hard to know where to start.
I'll appreciate any help !
Google Apps Script is, basically, a javascript environment with a set of libraries that interact with the Google Apps. For instance, to read or store information from/to Google Sheets or Google Docs. If you know javascript, you can create simple applications there. In addition, you can create plugins for Google Applications if you are interested.
A very simple example
Suppose you wanna display an HTML page. You can create an stand-alone script (an script not-bound to a G suite application) and use the content or the HTML services.
You can create a function that sends a simple message to the browser using the ContentService:
function doGet() {
return ContentService.createTextOutput('Hello, world!');
}
Or you can create a function that sends an HTML file in the same project using the HtmlService:
function doGet() {
return HtmlService.createHtmlOutputFromFile('Index');
}
Once you have created the function, you must deploy the script as a web application.
Save the script as a new version doing File > Manage Versions and Save new version.
Then, publish the app using Publish > Deploy as web app and provinding information about the permissions for the application.
After Google publishes the application, it gives you an URL to access the application,
You may check more in a simple tutorial on producing content with Google Apps Script. In addition, you may check the google guide to use the HtmlService to provide templated content, i.e. where the HTML are templates which data is provided by javascript functions and variables.
Getting started with Google Apps Script
To start, you may check some tutorials in the internet:
Google has some tutorials and a series of Youtube videos.
In addition, you may find multiple resources for Google App Scripts that may help you:
Google has a list of sample projects
Tanakeich has a list of resources for taking advantage of Google Apps Script.
Oshliaer has another list of resources.
There are Google Codelab (tutorials) for Apps Scripts. They include a lab for using Google Sheets as a reporting tool and for creating a Hangouts Chat bot with Apps Script
Developing Google Apps Script projects locally
Although Google Apps Script provides a web interface to create your applications (your scripts), a better idea may be to create the software locally, using more-traditional tools for Javascript.
Clasp is a command-line tool to develop locally Google Apps Script projects.
Google has a codelab that teach you how to use clasp.

Google apps script save google spreadsheet to excel version and load it from add-on

Hi I have an idea about file management between GAS and my BDserver. How so? Well, I'd like to have predesigned spreadsheet and save them somehow in my bd. Then users've installed my add-on can load that predesigned spreadsheet on his/her current spreadsheet. PD: Besides the user could save custom "predesigned spreadsheets" for helping to grow the app. How can I save a spreadsheet (Google Drive Spreadsheet) in my server and later call that "file" and load it in a empty spreadsheet? xml? json? export like excel file .xls??. I appreciate your suggestions.
You may find helpful information in Google Apps Script regarding the things that you can do with Google Apps like Docs, Sheets and Forms. You can also find links from the documentation which could help if you've developed a script for Google Sheets and want to share it with the world. App Script lets you publish your script as an add-on so others can install it from the add-on store.
In addition to that, to save your spreadsheet in your own database, you need to connect to it through Apps Script's JDBC service. First, you need to ensure that your database accepts connections from any of Apps Script's IP addresses as detailed in JDBC - Setup for other databases.

Summary Charts in Google Script from Google Spreadsheet

I'm new to Google scripting and have a very basic dashboard put together from all the information available online. The source is a Google spreadsheet of data exported from a database. I'm creating a Dashboard web app and would like to create summary charts on the dashboard due to the amount of information I'm working with. I've contemplated using Pivot Tables but would then lose the functionality of the CategoryFilters. I've seen lots of stuff about Google Visualization online and the Group function, but this doesn't seem to work in Google script. Can anyone advise what to do? Thanks.
Google give API for Google app script and Javascript.
It's really different because in app script you use a script in your google drive, and you use an app script editor.
If you use Google Vizualisation it's only javascript , you can deploy your javascript application in google app engine for example.
Google vizualisation is very interesting if you want to create a dataTable , a map , or others.
I use Google vizualisation for many charts because it's more simple and more dynamic than google app script.

Read google spreadsheet using drive sdk

Using the new Drive SDK, I would like to read and update rows/columns in a native google spreadsheet stored on my google drive, and display them on my web page. I m using Java and App Engine. I found the documentation and DrEdit example confusing, they don't exactly explain how to read/update native google docs. Can someone please explain to me what I need to do step by step, with code examples if possible? Thank you.
The Google Spreadsheets API would be the better choice for interacting directly with row and column data.