By Bruce Mcpherson

Whether you’re relocating from Microsoft workplace to Google doctors or just are looking to how to automate doctors with Google Apps Script, this useful consultant exhibits you through instance easy methods to paintings with all the significant Apps Script services.

Office nonetheless helps VBA, yet it’s not really to take action much longer. If you’re a VBA or .NET developer, you’ll the way to port current VBA code and constitution to their JavaScript-based Apps Script equivalents with minimum attempt. writer Bruce Mcpherson introduces JavaScript fundamentals for skilled builders surprising with the language, and demonstrates how you can construct real-world apps utilizing all the Apps Script prone formerly covered.

  • Use App Script’s identical of Excel’s item model
  • Target the main prevalent elements of Microsoft Word
  • Automate tactics in Gmail, Calendar, and Contacts
  • Access the neighborhood consumer filesystem with Google Drive
  • Build and run purposes in a browser
  • Store power information conveniently
  • Render HTML content material according to HTTP requests
  • Automate the upkeep and production of pages and content
  • Interact with a relaxation carrier or NoSQL database
  • Access Apps Script features from different platforms

Show description

Read or Download Going GAS: From VBA to Google Apps Script PDF

Best Computers books

Database Modeling and Design: Logical Design, 4th Edition (The Morgan Kaufmann Series in Data Management Systems)

Database platforms and database layout know-how have gone through major evolution in recent times. The relational facts version and relational database structures dominate company functions; in flip, they're prolonged by means of different applied sciences like info warehousing, OLAP, and knowledge mining. How do you version and layout your database software in attention of latest expertise or new enterprise wishes?

Computer Networking: A Top-Down Approach (6th Edition)

&>Computer Networking keeps with an early emphasis on application-layer paradigms and alertness programming interfaces (the most sensible layer), encouraging a hands-on adventure with protocols and networking strategies, ahead of operating down the protocol stack to extra summary layers. This e-book has turn into the dominant ebook for this path end result of the authors’ reputations, the precision of rationalization, the standard of the paintings software, and the worth in their personal supplementations.

The Guru's Guide to Transact-SQL

Considering its advent over a decade in the past, the Microsoft SQL Server question language, Transact-SQL, has develop into more and more renowned and extra strong. the present model activities such complicated good points as OLE Automation aid, cross-platform querying amenities, and full-text seek administration. This ebook is the consummate advisor to Microsoft Transact-SQL.

Data Structures and Problem Solving Using Java (4th Edition)

Facts constructions and challenge fixing utilizing Java takes a realistic and new angle to info constructions that separates interface from implementation. it truly is compatible for the second one or 3rd programming direction.   This e-book offers a realistic advent to info buildings with an emphasis on summary pondering and challenge fixing, in addition to using Java.

Additional info for Going GAS: From VBA to Google Apps Script

Show sample text content

A hundred and seventy | bankruptcy 7: The rfile App findText should be referred to as successively to come back every one incidence of textual content in a docu‐ ment, with the argument of the former fit to point the place to begin the hunt. This loop will create an array of all matching RangeElements: var rangeElements = [],rangeElement=null; whereas (rangeElement = physique. findText(textPattern, rangeElement)) { rangeElements. push ( rangeElement ); } Merging RangeElements we will use the RangeBuilder classification to make a spread from all of the goods chanced on by means of findText: functionality textRangeTest() { var document = DocumentApp. getActiveDocument(); document. setSelection(DocUtils. makeRangeFind(doc, "[tT]echnology")); } right here we use the makeRangeFind software: /** * locate all occurence of textual content within the rfile and make a number of it * @param {Document} document the record * @param {string} textPattern a regex string * @return {Range} the variety */ docUtils. makeRangeFind = functionality (doc, textPattern) { var physique = document. getBody(); var rangeElement = null, construct = document. newRange(); whereas (rangeElement = physique. findText(textPattern, rangeElement)) { if (rangeElement. isPartial()) { construct. addElement(rangeElement. getElement(), rangeElement. getStartOffset(), rangeElement. getEndOffsetInclusive()); } else { construct. addElement(rangeElement. getElement()); } } go back construct. build(); }; determine 7-13 exhibits the recent lively choice diversity, highlighting the chanced on textual content. levels | 171 Figure 7-13. Highlighted the textual content chanced on with findText And right here we be certain with showActiveSelection: TEXT:Technology(partial) TEXT:Technology(partial) TEXT:Technology(partial) TEXT:technology(partial) VBA locate the variety. locate process in note VBA is a reasonably strange development that dynami‐ cally adjusts the variety of which it's a member because it is going alongside. i've got regularly had a few difficulty coming to grips with its eccentricities, however it is the typical approach for locating textual content (and different properties). here's a VBA model of the makeRangeFind functionality. It returns a suite of quali‐ fying levels: ' /** ' * locate all occurence of textual content within the record and make a variety of it ' * @param {Document} document the record ' * @param {string} textPattern a string ' * @return {Collection} all of the levels ' */ Public functionality makeRangeFind(doc As record, textPattern As String) _ As assortment Dim outcome As assortment, searchRange As diversity Set outcome = New assortment With document. content material . locate. textual content = textPattern . locate. MatchCase = fake whereas . locate. Execute outcome. upload document. Range(. commence, . finish) Wend 172 | bankruptcy 7: The record App End With Set makeRangeFind = end result finish functionality hence then, the VBA levels inside the VBA assortment are reminiscent of the Apps Script RangeElements inside the Apps Script variety. the subsequent searches for all occurrences of know-how within the record: inner most Sub rangeFinder() DocUtils. showRange _ DocUtils. makeRangeFind(ActiveDocument, "technology") finish Sub with this consequence: paragraph paragraph paragraph paragraph textual content textual content textual content textual content zero fifty four 217 372 10 sixty four 227 382 know-how expertise know-how expertise Named levels levels may be given names that persist within the rfile.

Rated 4.97 of 5 – based on 19 votes