Rich Text

Technique for Managing Rich Text on Google Spreadsheet using Google Apps Script

Gists

Abstract

One day, you might have a situation where you are required to manage rich texts in Google Spreadsheet using Google Apps Script. In this report, I would like to introduce the basic technique for managing rich texts with Google Apps Script.

Introduction

At Google Spreadsheet, rich texts can be used as a cell value. The rich texts can be also managed by Google Apps Script. Ref When I saw the official document related to the rich texts with Google Apps Script, I’m worried that it might be difficult a little for users to manage the rich texts using Google Apps Script.

Updated: GAS Library - RichTextApp

RichTextApp was updated to v1.3.0

  • v1.3.0 (October 20, 2021)

    1. Added a new method of RangeToHTMLTableForSpreadsheet. In this method, the range on Google Spreadsheet is converted to a HTML table. Using this method, for example, you can send the specific range in the Spreadsheet as an email by including a HTML table.

You can see the detail information here https://github.com/tanaikech/RichTextApp

Updated: GAS Library - RichTextApp

RichTextApp was updated to v1.1.2

  • v1.1.0 (June 16, 2020)

    1. Add new method of RichTextToHTMLForSpreadsheet. The method of RichTextToHTMLForSpreadsheet can convert the rich texts in the cells to the HTML format.
  • v1.1.1 (June 16, 2020)

    1. About the method of RichTextToHTMLForSpreadsheet, I forgot to convert hyperlinks to HTML. This was modified.
  • v1.1.2 (June 16, 2020)

    1. When one row and several columns are used as the range, only 1st column is returned. This bug was removed.

You can see the detail information here https://github.com/tanaikech/RichTextApp

GAS Library - RichTextApp

Overview

This is a GAS library for copying the rich text with the text styles from Google Document to Google Spreadsheet or from Google Spreadsheet to Google Document using Google Apps Script (GAS).

Description

Google Spreadsheet can use the rich text as the cell value. But I thought that it is difficult for me to directly edit the rich text in a cell. So I wanted to copy the rich text, that I edited at the Google Document, to the cell of Google Spreadsheet. But, unfortunately, when the rich text in Google Document is manually copied to a cell in Google Spreadsheet, the text style is removed. By this, only text values are copied. It seemed that this was the current specification. So in order to achieve above, I created this as a library.