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.
RichTextApp was updated to v1.4.0

-
v1.4.0 (May 25, 2022)
- Added a new method of
ReplaceTextToRichText. In this method, the text in a cell is converted to the richtext.
You can see the detail information here https://github.com/tanaikech/RichTextApp
RichTextApp was updated to v1.3.1
You can see the detail information here https://github.com/tanaikech/RichTextApp
RichTextApp was updated to v1.3.0

You can see the detail information here https://github.com/tanaikech/RichTextApp
RichTextApp was updated to v1.2.0
-
v1.2.0 (July 3, 2020)
- Added the method of
AutoResizeFontForSpreadsheet. This method can automatically adjust the text length to fit in the cell width by changing the font size.
You can see the detail information here https://github.com/tanaikech/RichTextApp
RichTextApp was updated to v1.1.3
-
v1.1.3 (June 17, 2020)
- The variable name for the error processing was not correct. The bug was removed.
- Added a sample script for using this library.
You can see the detail information here https://github.com/tanaikech/RichTextApp
RichTextApp was updated to v1.1.2
-
v1.1.0 (June 16, 2020)
- 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)
- About the method of
RichTextToHTMLForSpreadsheet, I forgot to convert hyperlinks to HTML. This was modified.
-
v1.1.2 (June 16, 2020)
- 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
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.