SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
Google: Drive, Documents
and Apps Script
GDG DevFest Pisa 2019
How to work efficiently and happily
whoami?
Alessandra Santi
email: santi.info@gmail.com
● Chartered Accountant and Auditor
● Linux User
Table of Contents
● Google Drive
● Google Documents
● Sharing documents
● Google Apps Script
● Automate jobs
Drive
Table of Contents
● Google Drive
● Google Documents
● Sharing documents
● Google Apps Script
● Automate jobs
Docs, sheets, forms, slides
Table of Contents
● Google Drive
● Google Documents
● Sharing documents
● Google Apps Script
● Automate jobs
Apps Script
where?Drive
where?
● App Google
● Drive
what is it?
Drive
container where:
- to save,
- to organize,
- to manipulate,
- to share
files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
zoom
Right click
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
container where to save, organize, manipulate and share files
Working with documents
● Docs
● Sheets
● Slides
● Forms
● ….
Word processor and Spreadsheet
Spreadsheet functions
download in different formats
Forms → like a Mask → to record data
Slides → These slides with Slides :)
Setting
With or WithOut Net
Open files offline
To turn on offline access:
● You must be connected to the internet.
● Use the Google Chrome browser.
● Don't use private browsing.
● Install and enable Google Docs offline Chrome extension.
● Make sure you have enough free space on your device.
Open Google Docs, Sheets, and Slides offline
1. Open Chrome. Make sure you're signed in to Chrome.
2. Go to drive.google.com/drive/settings.
3. Check the box next to Sync Google Docs, Sheets ... files
https://support.google.com/drive/answer/2375012?co=GENIE.Platform%3DDesktop&hl=en
Apps Script
Automate jobs
Apps script
How to install
Apps script
Script
Bound
Script
Standalone
Apps Script
Apps Script Where to learn!
https://developers.google.com/apps-script/
Apps Script Documentation
https://developers.google.com/apps-script/
Apps Script A lot of documentation!
https://developers.google.com/apps-script/
Apps Script A lot of documentation!
Beginners: Ohhhh!!!!
Title: Skrik - Author: Edvard Munch
Apps Script
Don’t worry! No Panic!
● https://developers.google.com/apps-script/overview
● https://developers.google.com/apps-script/articles/
Scripts run on Google’s Servers
Nothing to install
Help: Guides, Tutorials...
Language: JavaScript
Apps Script
“You see, but you do not observe.
The distinction is clear.”
Sherlock Holmes Quote
scripts
Apps Script Observe code
https://codelabs.developers.google.com/codelabs/apps-script-intro/#4
function sendMap() {
var sheet = SpreadsheetApp.getActiveSheet();
var address = sheet.getRange('A1').getValue();
var map = Maps.newStaticMap().addMarker(address);
GmailApp.sendEmail('friend@example.com',
'Map',
'See below.',
{attachments:[map]})
}
function declaration
class method
Apps Script Observe code
Manipulating sheets: Formatting Cells
● Add headers
● Customize background cells (color, fonts …)
● Adjust columns size
● ….
Sheet: new style :)
Apps Script Observe code
Bounds
Script
Special Methods:
● getActiveSpreadsheet()
● getActiveSheet()
● getActiveRange()
● getActiveCell()
● setActiveSheet(sheet)
● setActiveRange(range)
https://developers.google.com/apps-script/guides/bound
Allow bound scripts to refer
to their parent file without
referring to the file's ID
Let the script determine the user's
current Sheet, selected Range of
cells, or selected individual Cell
Let the script change
getActive* selections
function formatStyle() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
//var sheet = ss.getSheetByName( 'Sheet1' );
var range1 = sheet.getRange( 'A1:C1' );
var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns)
range1.mergeAcross()
.setBackground( 'green' )
.setValue( 'report' )
.setFontSize(12);
range2.setBackground( '#3bf59b' )
.setValues( [['Name', 'LastName', 'Value']] )
.setFontSize(10);
sheet.getRange(1, 1, 2, 3)
.setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal)
.setHorizontalAlignment( ['left', 'left', 'right'] )
.setVerticalAlignment( 'bottom' )
.setFontWeight( 'bold' );
var columnWidth = [150, 150, 80];
for ( var i = 0; i < columnWidth.length; i++ ) {
sheet.setColumnWidth(i+1,columnWidth[i]);
}
sheet.setFrozenRows(2);
SpreadsheetApp.flush();
}
Observe code
run =
video1
function formatStyle() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
//var sheet = ss.getSheetByName( 'Sheet1' );
var range1 = sheet.getRange( 'A1:C1' );
var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns)
range1.mergeAcross()
.setBackground( 'green' )
.setValue( 'report' )
.setFontSize(12);
range2.setBackground( '#3bf59b' )
.setValues( [['Name', 'LastName', 'Value']] )
.setFontSize(10);
sheet.getRange(1, 1, 2, 3)
.setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal)
.setHorizontalAlignment( ['left', 'left', 'right'] )
.setVerticalAlignment( 'bottom' )
.setFontWeight( 'bold' );
var columnWidth = [150, 150, 80];
for ( var i = 0; i < columnWidth.length; i++ ) {
sheet.setColumnWidth(i+1,columnWidth[i]);
}
sheet.setFrozenRows(2);
SpreadsheetApp.flush();
}
Observe code
function formatStyle() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
//var sheet = ss.getSheetByName( 'Sheet1' );
var range1 = sheet.getRange( 'A1:C1' );
var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns)
range1.mergeAcross()
.setBackground( 'green' )
.setValue( 'report' )
.setFontSize(12);
range2.setBackground( '#3bf59b' )
.setValues( [['Name', 'LastName', 'Value']] )
.setFontSize(10);
sheet.getRange(1, 1, 2, 3)
.setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal)
.setHorizontalAlignment( ['left', 'left', 'right'] )
.setVerticalAlignment( 'bottom' )
.setFontWeight( 'bold' );
var columnWidth = [150, 150, 80];
for ( var i = 0; i < columnWidth.length; i++ ) {
sheet.setColumnWidth(i+1,columnWidth[i]);
}
sheet.setFrozenRows(2);
SpreadsheetApp.flush();
}
Observe code
count from 0 (0, 1, 2)
count from 0 (0, 1, 2)
function onOpen(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
//var sheet = ss.getSheetByName( 'Sheet1' );
var range1 = sheet.getRange( 'A1:C1' );
var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns)
range1.mergeAcross()
.setBackground( 'green' )
.setValue( 'report' )
.setFontSize(12);
range2.setBackground( '#3bf59b' )
.setValues( [['Name', 'LastName', 'Value']] )
.setFontSize(10);
sheet.getRange(1, 1, 2, 3)
.setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal)
.setHorizontalAlignment( ['left', 'left', 'right'] )
.setVerticalAlignment( 'bottom' )
.setFontWeight( 'bold' );
var columnWidth = [150, 150, 80];
for ( var i = 0; i < columnWidth.length; i++ ) {
sheet.setColumnWidth(i+1,columnWidth[i]);
}
sheet.setFrozenRows(2);
SpreadsheetApp.flush();
}
Observe code
Trigger
onOpen()
open file
Apps Script Observe code
● Add data
● Create and apply formulas
● Create charts
● Apply SQL queries
● ...
Customize your
work tools :)
Observe code/**
* A custom function that calculate tot price.
*
* @param {values} range of two cells
* @return {tot_price} Un_Price * Q_ty
*/
function TOTPRICE(values) {
var tot_pr = 1;
for ( var i = 0; i < values[0].length; i++) {
tot_pr *= values[0][i]; //tot_pr = tot_pr * values[0][i];
}
return tot_pr;
}
Custom function
Create a function with formula
video2
Observe code/**
* A custom function that calculate tot price.
*
* @param {values} range of two cells
* @return {tot_price} Un_Price * Q_ty
*/
function TOTPRICE(values) {
var tot_pr = 1;
for ( var i = 0; i < values[0].length; i++) {
tot_pr *= values[0][i]; //tot_pr = tot_pr * values[0][i];
}
return tot_pr;
}
Custom function
Create a function with formula
Observe codefunction addChart() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range1 = sheet.getRange("A1:B6")
var chart = sheet.newChart()
.setChartType(Charts.ChartType.LINE)
.addRange(range1)
.setPosition(1, 4, 0, 0) //(anchorRowPos,anchorColPos,offsetX, offsetY)
.build();
sheet.insertChart(chart);
}
Embedded a Chart
video3
Observe codefunction addChart() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range1 = sheet.getRange("A1:B6")
var chart = sheet.newChart()
.setChartType(Charts.ChartType.LINE)
.addRange(range1)
.setPosition(1, 4, 0, 0) //(anchorRowPos,anchorColPos,offsetX, offsetY)
.build();
sheet.insertChart(chart);
}
Embedded a Chart
Observe code
function addProfit() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getActiveSheet();
var range = sh.getRange(2, 3, 20, 2).getValues();
var profits = range.map( function(row) { return [ row[0] - row[1] ]; } );
sh.getRange(2, 5, profits.length, profits[0].length).setValues(profits);
sh.getRange(1, 5).setValue("profits").setFontWeight('bold');
}
.map
Populate a Range of Values
https://www.youtube.com/watch?v=985XJOeigpA
Observe code
function PROFIT(sales, cogs) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getActiveSheet();
var profit = sales - cogs;
return profit;
}
method .map
Observe codefunction addProfit() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getActiveSheet();
var range = sh.getRange(2, 3, 20, 2).getValues();
var profits = range.map( function(row) {
return [ row[0] - row[1] ];
}
);
sh.getRange(2, 5, profits.length, profits[0].length).setValues(profits);
sh.getRange(1, 5).setValue("profits").setFontWeight('bold');
}
.map
video4
Apps Script
attention … please! other considerations
Apps Script
Tutorial:
https://codelabs.developers.google.com/codelabs/apps-script-intro/#5
Run Authorization
Required
attention … please!
Apps Script
Alt +
space
Auto-complete
code
attention … please!
Drive: Ocr text in Docs
attention … please!
video5
End
Thank you for your attention!
GDG DevFest Pisa 2019 - 13/04/2019 - Alessandra Santi - licence: CC BY-NC-SA

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Living
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Project presentation(View calender)
Project presentation(View calender)Project presentation(View calender)
Project presentation(View calender)
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Codigo Server Festival
Codigo Server  FestivalCodigo Server  Festival
Codigo Server Festival
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 

Ähnlich wie Google: Drive, Documents and Apps Script - How to work efficiently and happily

Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
Yekmer Simsek
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
Justin Cataldo
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Jim Tochterman
 
Javascript unit testing with QUnit and Sinon
Javascript unit testing with QUnit and SinonJavascript unit testing with QUnit and Sinon
Javascript unit testing with QUnit and Sinon
Lars Thorup
 

Ähnlich wie Google: Drive, Documents and Apps Script - How to work efficiently and happily (20)

Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...
 
Google Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with CodeGoogle Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with Code
 
EP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For AssetsEP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScript
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
Code Management
Code ManagementCode Management
Code Management
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
Art & music vs Google App Engine
Art & music vs Google App EngineArt & music vs Google App Engine
Art & music vs Google App Engine
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
 
Bubbles & Trees with jQuery
Bubbles & Trees with jQueryBubbles & Trees with jQuery
Bubbles & Trees with jQuery
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Secrets of JavaScript Libraries
Secrets of JavaScript LibrariesSecrets of JavaScript Libraries
Secrets of JavaScript Libraries
 
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin PovolnyDesign Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
 
Javascript unit testing with QUnit and Sinon
Javascript unit testing with QUnit and SinonJavascript unit testing with QUnit and Sinon
Javascript unit testing with QUnit and Sinon
 
How to use lekhoniya.pdf
How to use lekhoniya.pdfHow to use lekhoniya.pdf
How to use lekhoniya.pdf
 

Kürzlich hochgeladen

Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
gajnagarg
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
gajnagarg
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
amitlee9823
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
gajnagarg
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 

Kürzlich hochgeladen (20)

Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls kakinada Escorts ☎️9352988975 Two shot with one girl...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men  🔝Sambalpur🔝   Esc...
➥🔝 7737669865 🔝▻ Sambalpur Call-girls in Women Seeking Men 🔝Sambalpur🔝 Esc...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
 

Google: Drive, Documents and Apps Script - How to work efficiently and happily

  • 1. Google: Drive, Documents and Apps Script GDG DevFest Pisa 2019 How to work efficiently and happily
  • 2. whoami? Alessandra Santi email: santi.info@gmail.com ● Chartered Accountant and Auditor ● Linux User
  • 3. Table of Contents ● Google Drive ● Google Documents ● Sharing documents ● Google Apps Script ● Automate jobs Drive
  • 4. Table of Contents ● Google Drive ● Google Documents ● Sharing documents ● Google Apps Script ● Automate jobs Docs, sheets, forms, slides
  • 5. Table of Contents ● Google Drive ● Google Documents ● Sharing documents ● Google Apps Script ● Automate jobs Apps Script
  • 8. what is it? Drive container where: - to save, - to organize, - to manipulate, - to share files
  • 9. container where to save, organize, manipulate and share files
  • 10. container where to save, organize, manipulate and share files
  • 11. container where to save, organize, manipulate and share files zoom Right click
  • 12. container where to save, organize, manipulate and share files
  • 13. container where to save, organize, manipulate and share files
  • 14. container where to save, organize, manipulate and share files
  • 15. container where to save, organize, manipulate and share files
  • 16. container where to save, organize, manipulate and share files
  • 17. container where to save, organize, manipulate and share files
  • 18. Working with documents ● Docs ● Sheets ● Slides ● Forms ● ….
  • 19. Word processor and Spreadsheet
  • 21. Forms → like a Mask → to record data
  • 22. Slides → These slides with Slides :)
  • 24. With or WithOut Net Open files offline To turn on offline access: ● You must be connected to the internet. ● Use the Google Chrome browser. ● Don't use private browsing. ● Install and enable Google Docs offline Chrome extension. ● Make sure you have enough free space on your device. Open Google Docs, Sheets, and Slides offline 1. Open Chrome. Make sure you're signed in to Chrome. 2. Go to drive.google.com/drive/settings. 3. Check the box next to Sync Google Docs, Sheets ... files https://support.google.com/drive/answer/2375012?co=GENIE.Platform%3DDesktop&hl=en
  • 29. Apps Script Where to learn! https://developers.google.com/apps-script/
  • 31. Apps Script A lot of documentation! https://developers.google.com/apps-script/
  • 32. Apps Script A lot of documentation! Beginners: Ohhhh!!!! Title: Skrik - Author: Edvard Munch
  • 33. Apps Script Don’t worry! No Panic! ● https://developers.google.com/apps-script/overview ● https://developers.google.com/apps-script/articles/ Scripts run on Google’s Servers Nothing to install Help: Guides, Tutorials... Language: JavaScript
  • 34. Apps Script “You see, but you do not observe. The distinction is clear.” Sherlock Holmes Quote scripts
  • 35. Apps Script Observe code https://codelabs.developers.google.com/codelabs/apps-script-intro/#4 function sendMap() { var sheet = SpreadsheetApp.getActiveSheet(); var address = sheet.getRange('A1').getValue(); var map = Maps.newStaticMap().addMarker(address); GmailApp.sendEmail('friend@example.com', 'Map', 'See below.', {attachments:[map]}) } function declaration class method
  • 36. Apps Script Observe code Manipulating sheets: Formatting Cells ● Add headers ● Customize background cells (color, fonts …) ● Adjust columns size ● …. Sheet: new style :)
  • 37. Apps Script Observe code Bounds Script Special Methods: ● getActiveSpreadsheet() ● getActiveSheet() ● getActiveRange() ● getActiveCell() ● setActiveSheet(sheet) ● setActiveRange(range) https://developers.google.com/apps-script/guides/bound Allow bound scripts to refer to their parent file without referring to the file's ID Let the script determine the user's current Sheet, selected Range of cells, or selected individual Cell Let the script change getActive* selections
  • 38. function formatStyle() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; //var sheet = ss.getSheetByName( 'Sheet1' ); var range1 = sheet.getRange( 'A1:C1' ); var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns) range1.mergeAcross() .setBackground( 'green' ) .setValue( 'report' ) .setFontSize(12); range2.setBackground( '#3bf59b' ) .setValues( [['Name', 'LastName', 'Value']] ) .setFontSize(10); sheet.getRange(1, 1, 2, 3) .setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal) .setHorizontalAlignment( ['left', 'left', 'right'] ) .setVerticalAlignment( 'bottom' ) .setFontWeight( 'bold' ); var columnWidth = [150, 150, 80]; for ( var i = 0; i < columnWidth.length; i++ ) { sheet.setColumnWidth(i+1,columnWidth[i]); } sheet.setFrozenRows(2); SpreadsheetApp.flush(); } Observe code run = video1
  • 39. function formatStyle() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; //var sheet = ss.getSheetByName( 'Sheet1' ); var range1 = sheet.getRange( 'A1:C1' ); var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns) range1.mergeAcross() .setBackground( 'green' ) .setValue( 'report' ) .setFontSize(12); range2.setBackground( '#3bf59b' ) .setValues( [['Name', 'LastName', 'Value']] ) .setFontSize(10); sheet.getRange(1, 1, 2, 3) .setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal) .setHorizontalAlignment( ['left', 'left', 'right'] ) .setVerticalAlignment( 'bottom' ) .setFontWeight( 'bold' ); var columnWidth = [150, 150, 80]; for ( var i = 0; i < columnWidth.length; i++ ) { sheet.setColumnWidth(i+1,columnWidth[i]); } sheet.setFrozenRows(2); SpreadsheetApp.flush(); } Observe code
  • 40. function formatStyle() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; //var sheet = ss.getSheetByName( 'Sheet1' ); var range1 = sheet.getRange( 'A1:C1' ); var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns) range1.mergeAcross() .setBackground( 'green' ) .setValue( 'report' ) .setFontSize(12); range2.setBackground( '#3bf59b' ) .setValues( [['Name', 'LastName', 'Value']] ) .setFontSize(10); sheet.getRange(1, 1, 2, 3) .setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal) .setHorizontalAlignment( ['left', 'left', 'right'] ) .setVerticalAlignment( 'bottom' ) .setFontWeight( 'bold' ); var columnWidth = [150, 150, 80]; for ( var i = 0; i < columnWidth.length; i++ ) { sheet.setColumnWidth(i+1,columnWidth[i]); } sheet.setFrozenRows(2); SpreadsheetApp.flush(); } Observe code count from 0 (0, 1, 2) count from 0 (0, 1, 2)
  • 41. function onOpen(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; //var sheet = ss.getSheetByName( 'Sheet1' ); var range1 = sheet.getRange( 'A1:C1' ); var range2 = sheet.getRange(2, 1, 1, 3); //(row, column, numRows, numColumns) range1.mergeAcross() .setBackground( 'green' ) .setValue( 'report' ) .setFontSize(12); range2.setBackground( '#3bf59b' ) .setValues( [['Name', 'LastName', 'Value']] ) .setFontSize(10); sheet.getRange(1, 1, 2, 3) .setBorder(true, true, true, true, true, true) /(top, left, bottom, right, vertical, horizontal) .setHorizontalAlignment( ['left', 'left', 'right'] ) .setVerticalAlignment( 'bottom' ) .setFontWeight( 'bold' ); var columnWidth = [150, 150, 80]; for ( var i = 0; i < columnWidth.length; i++ ) { sheet.setColumnWidth(i+1,columnWidth[i]); } sheet.setFrozenRows(2); SpreadsheetApp.flush(); } Observe code Trigger onOpen() open file
  • 42. Apps Script Observe code ● Add data ● Create and apply formulas ● Create charts ● Apply SQL queries ● ... Customize your work tools :)
  • 43. Observe code/** * A custom function that calculate tot price. * * @param {values} range of two cells * @return {tot_price} Un_Price * Q_ty */ function TOTPRICE(values) { var tot_pr = 1; for ( var i = 0; i < values[0].length; i++) { tot_pr *= values[0][i]; //tot_pr = tot_pr * values[0][i]; } return tot_pr; } Custom function Create a function with formula video2
  • 44. Observe code/** * A custom function that calculate tot price. * * @param {values} range of two cells * @return {tot_price} Un_Price * Q_ty */ function TOTPRICE(values) { var tot_pr = 1; for ( var i = 0; i < values[0].length; i++) { tot_pr *= values[0][i]; //tot_pr = tot_pr * values[0][i]; } return tot_pr; } Custom function Create a function with formula
  • 45. Observe codefunction addChart() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var range1 = sheet.getRange("A1:B6") var chart = sheet.newChart() .setChartType(Charts.ChartType.LINE) .addRange(range1) .setPosition(1, 4, 0, 0) //(anchorRowPos,anchorColPos,offsetX, offsetY) .build(); sheet.insertChart(chart); } Embedded a Chart video3
  • 46. Observe codefunction addChart() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var range1 = sheet.getRange("A1:B6") var chart = sheet.newChart() .setChartType(Charts.ChartType.LINE) .addRange(range1) .setPosition(1, 4, 0, 0) //(anchorRowPos,anchorColPos,offsetX, offsetY) .build(); sheet.insertChart(chart); } Embedded a Chart
  • 47. Observe code function addProfit() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sh = ss.getActiveSheet(); var range = sh.getRange(2, 3, 20, 2).getValues(); var profits = range.map( function(row) { return [ row[0] - row[1] ]; } ); sh.getRange(2, 5, profits.length, profits[0].length).setValues(profits); sh.getRange(1, 5).setValue("profits").setFontWeight('bold'); } .map Populate a Range of Values https://www.youtube.com/watch?v=985XJOeigpA
  • 48. Observe code function PROFIT(sales, cogs) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sh = ss.getActiveSheet(); var profit = sales - cogs; return profit; } method .map
  • 49. Observe codefunction addProfit() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sh = ss.getActiveSheet(); var range = sh.getRange(2, 3, 20, 2).getValues(); var profits = range.map( function(row) { return [ row[0] - row[1] ]; } ); sh.getRange(2, 5, profits.length, profits[0].length).setValues(profits); sh.getRange(1, 5).setValue("profits").setFontWeight('bold'); } .map video4
  • 50. Apps Script attention … please! other considerations
  • 53. Drive: Ocr text in Docs attention … please! video5
  • 54. End Thank you for your attention! GDG DevFest Pisa 2019 - 13/04/2019 - Alessandra Santi - licence: CC BY-NC-SA