convertRichTextToHtml
function convertRichTextToHtml(richText: GoogleAppsScript.Spreadsheet.RichTextValue): string;
Each run of the value becomes a span carrying the styles it had — weight, slant, underline, strikethrough, colour, size and family — and a link becomes an anchor. The text itself is escaped, so a cell holding <b> comes out as text and not as markup.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The rich text value to render. |
Returns
string — the HTML.
Examples
In use
const range = SpreadsheetApp.getActiveRange();
const html = convertRichTextToHtml(range.getRichTextValue());
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.