Formatting text with the Google Sheets & Slides APIsThe Google Sheets and Google Slides APIs are there for developers who need to programmatically create, populate, or otherwise update spreadsheets or slide presentations, respectively. While text formatting is something you typically do via their user interfaces, these are also features available through both APIs, and in case you missed them during the holidays, the Google Developers team published two episodes hosted by Google engineer Wesley Chun (
+wesley chun) who leads you through short code samples demoing how to format text with each API.
https://goo.gl/AKMkgZFormatting text using Sheets API requires developers know the range of cells they wish to format, and depending on the type of format desired, may have to issue a variety of formatting commands. These include requests like setting frozen rows, adding cell validation, or applying a specific formatting command such as bolding or italics across multiple cells. The DevByte video (see post at
https://goo.gl/BUJqWd) covers each of these use cases.
https://goo.gl/1zm11dFor the Slides API, you no longer think about formatting a range of cells, but rather, must consider the structure of the text copy that is on a slide. You’re thinking paragraphs and indexes of the text copy within paragraphs. And, more than likely, you’ll be updating the “text style” for the affected text. Check the video (see post at
https://goo.gl/LIF1NI) to learn how to tweak the text style on slides in a variety of ways.
To get started with the Sheets API, try our codelab (
g.co/codelabs/sheets) which guides you step-by-step in building a Node.js reporting tool. Also be sure to check out the official API documentation (
developers.google.com/sheets). To learn about the Slides API, you’ll find many quick start examples and guides in the API documentation (
developers.google.com/slides). To see an example of a useful app you can build with the Slides API, check out our Markdown-to-Google Slides coverter (also a Node.js app), now a popular repo on Github (
github.com/googlesamples/md2googleslides).
#GSuiteDevShow #Google #SheetsAPI #SlidesAPI #GSuite