Этот сервис позволяет скриптам создавать, получать доступ и изменять файлы Google Docs.
// Open a document by ID.
var doc = DocumentApp.openById('DOCUMENT_ID');
// Create and open a document.
doc = DocumentApp.create('Document Name');Классы
| Имя | Краткое описание |
|---|---|
Attribute | Перечень атрибутов элемента. |
Body | Содержимое вкладки в документе Google Docs. |
Bookmark | Объект, представляющий собой закладку. |
Container Element | Обобщенный элемент, который может содержать другие элементы. |
Date | Элемент, представляющий отформатированную дату. |
Document | Документ, содержащий один или несколько объектов Tab , каждый из которых содержит форматированный текст и такие элементы, как таблицы и списки. |
Document App | Служба документов создает и открывает Documents , которые можно редактировать. |
Document Tab | Вкладка документа, содержащая форматированный текст и такие элементы, как таблицы и списки. |
Element | Обобщенный элемент. |
Element Type | Перечень всех типов элементов. |
Equation | Элемент, представляющий математическое выражение. |
Equation Function | Элемент, представляющий функцию в математическом Equation . |
Equation Function Argument Separator | Элемент, представляющий собой разделитель функций в математическом Equation . |
Equation Symbol | Элемент, представляющий собой символ в математическом Equation . |
| Перечень поддерживаемых шрифтов. |
Footer Section | Элемент, представляющий собой нижний колонтитул. |
Footnote | Элемент, представляющий собой сноску. |
Footnote Section | Элемент, представляющий собой раздел сносок. |
Glyph Type | Перечень поддерживаемых типов глифов. |
Header Section | Элемент, представляющий собой раздел заголовка. |
Horizontal Alignment | Перечень поддерживаемых типов горизонтального выравнивания. |
Horizontal Rule | Элемент, представляющий собой горизонтальную линию. |
Inline Drawing | Элемент, представляющий собой встроенный рисунок. |
Inline Image | Элемент, представляющий собой встроенное изображение. |
List Item | Элемент, представляющий собой элемент списка. |
Named Range | Range , имеющий имя и идентификатор для последующего извлечения. |
Page Break | Элемент, обозначающий разрыв страницы. |
Paragraph | Элемент, представляющий собой абзац. |
Paragraph Heading | Перечень стандартных заголовков абзацев. |
Person | Элемент, представляющий собой ссылку на человека. |
Position | Ссылка на местоположение на вкладке документа относительно конкретного элемента. |
Positioned Image | Изображение, находящееся в фиксированном положении и привязанное к Paragraph . |
Positioned Layout | Перечисление, определяющее способ размещения Positioned Image относительно окружающего текста. |
Range | Набор элементов в документе. |
Range Builder | Конструктор, используемый для создания объектов Range из элементов документа. |
Range Element | Оболочка вокруг Element с возможным начальным и конечным смещением. |
Rich Link | Элемент, представляющий собой ссылку на ресурс Google, например, на файл в Google Диска или видео на YouTube. |
Tab | Вкладка внутри документа Google Docs. |
Tab Type | Перечень всех типов вкладок. |
Table | Элемент, представляющий собой таблицу. |
Table Cell | Элемент, представляющий ячейку таблицы. |
Table Of Contents | Элемент, содержащий оглавление. |
Table Row | Элемент, представляющий собой строку таблицы. |
Text | Элемент, представляющий собой область с расширенным текстовым содержимым. |
Text Alignment | Перечень типов выравнивания текста. |
Unsupported Element | Элемент, представляющий собой область, которая неизвестна или не может быть затронута скриптом, например, номер страницы. |
Vertical Alignment | Перечень поддерживаемых типов вертикального выравнивания. |
Attribute
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
BACKGROUND_COLOR | Enum | Цвет фона элемента (абзаца, таблицы и т. д.) или документа. |
BOLD | Enum | Настройка толщины шрифта для форматированного текста. |
BORDER_COLOR | Enum | Цвет границы для элементов таблицы. |
BORDER_WIDTH | Enum | Ширина границы в пунктах для элементов таблицы. |
CODE | Enum | Содержимое кода для элементов уравнения. |
FONT_FAMILY | Enum | Параметр «Семейство шрифтов» для форматированного текста. |
FONT_SIZE | Enum | Размер шрифта в пунктах для форматированного текста. |
FOREGROUND_COLOR | Enum | Настройка цвета переднего плана для форматированного текста. |
HEADING | Enum | Тип заголовка для элементов абзаца (например, Document App.ParagraphHeading.HEADING1 ). |
HEIGHT | Enum | Настройка высоты для элементов изображения. |
HORIZONTAL_ALIGNMENT | Enum | Горизонтальное выравнивание для элементов абзаца (например, Document App.HorizontalAlignment.CENTER ). |
INDENT_END | Enum | Параметр "Конечный отступ в пунктах" для элементов абзаца. |
INDENT_FIRST_LINE | Enum | Настройка отступа первой строки в пунктах для элементов абзаца. |
INDENT_START | Enum | Начальный отступ в пунктах для элементов абзаца. |
ITALIC | Enum | Настройка стиля шрифта для форматированного текста. |
GLYPH_TYPE | Enum | Тип глифа для элементов списка. |
LEFT_TO_RIGHT | Enum | Настройка направления текста для форматированного текста. |
LINE_SPACING | Enum | Параметр межстрочного интервала в виде множителя для элементов абзаца. |
LINK_URL | Enum | URL-адрес ссылки для форматированного текста. |
LIST_ID | Enum | Идентификатор включающего списка для элементов списка. |
MARGIN_BOTTOM | Enum | Нижний отступ для элементов абзаца задается в пунктах. |
MARGIN_LEFT | Enum | Левое поле в пунктах для элементов абзаца. |
MARGIN_RIGHT | Enum | Поле справа в пунктах для элементов абзаца. |
MARGIN_TOP | Enum | Верхний отступ в пунктах для элементов абзаца. |
NESTING_LEVEL | Enum | Уровень вложенности элементов списка. |
MINIMUM_HEIGHT | Enum | Минимальная высота элементов строк таблицы, заданная в пунктах. |
PADDING_BOTTOM | Enum | Нижний отступ в пунктах для элементов ячеек таблицы. |
PADDING_LEFT | Enum | Отступ слева в пунктах для элементов ячеек таблицы. |
PADDING_RIGHT | Enum | Правильный отступ в пунктах для элементов ячеек таблицы. |
PADDING_TOP | Enum | Верхний отступ в пунктах для элементов ячеек таблицы. |
PAGE_HEIGHT | Enum | Высота страницы в пунктах для документов. |
PAGE_WIDTH | Enum | Ширина страницы в пунктах для документов. |
SPACING_AFTER | Enum | Нижний межстрочный интервал в пунктах для элементов абзаца. |
SPACING_BEFORE | Enum | Отступ сверху в пунктах для элементов абзаца. |
STRIKETHROUGH | Enum | Функция зачеркивания для форматированного текста. |
UNDERLINE | Enum | Параметр подчеркивания для форматированного текста. |
VERTICAL_ALIGNMENT | Enum | Параметр вертикального выравнивания для элементов ячеек таблицы. |
WIDTH | Enum | Настройка ширины для ячеек таблицы и элементов изображений. |
Body
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Horizontal Rule() | Horizontal Rule | Создает и добавляет новую Horizontal Rule . |
append Image(image) | Inline Image | Создает и добавляет новое Inline Image из указанного блока изображений. |
append Image(image) | Inline Image | Добавляет заданное Inline Image . |
append List Item(listItem) | List Item | Добавляет указанный List Item . |
append List Item(text) | List Item | Создает и добавляет новый List Item содержащий указанное текстовое содержимое. |
append Page Break() | Page Break | Создает и добавляет новый Page Break . |
append Page Break(pageBreak) | Page Break | Добавляет указанный Page Break . |
append Paragraph(paragraph) | Paragraph | Добавляет данный Paragraph . |
append Paragraph(text) | Paragraph | Создает и добавляет новый Paragraph содержащий указанное текстовое содержимое. |
append Table() | Table | Создает и добавляет новую Table . |
append Table(cells) | Table | Добавляет новую Table содержащую Table Cell для каждого указанного строкового значения. |
append Table(table) | Table | Добавляет данные Table . |
clear() | Body | Очищает содержимое элемента. |
copy() | Body | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Heading Attributes(paragraphHeading) | Object | Получает набор атрибутов для указанного Paragraph Heading . |
get Images() | Inline Image[] |null | Извлекает все Inline Images содержащиеся в разделе. |
get List Items() | List Item[] |null | Извлекает все List Items содержащиеся в разделе. |
get Margin Bottom() | Number|null | Извлекает нижний отступ в пунктах. |
get Margin Left() | Number|null | Извлекает левый край в пунктах. |
get Margin Right() | Number|null | Восстанавливает правый край. |
get Margin Top() | Number|null | Извлекает верхний отступ. |
get Num Children() | Integer | Получает количество детей. |
get Page Height() | Number|null | Получает высоту страницы в пунктах. |
get Page Width() | Number|null | Извлекает ширину страницы в пунктах. |
get Paragraphs() | Paragraph[] |null | Извлекает все Paragraphs содержащиеся в разделе (включая List Items ). |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Tables() | Table[] |null | Извлекает все Tables содержащиеся в данном разделе. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
insert Horizontal Rule(childIndex) | Horizontal Rule | Создает и вставляет новую Horizontal Rule по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Создает и вставляет Inline Image из указанного блока изображений по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Вставляет заданное Inline Image по указанному индексу. |
insert List Item(childIndex, listItem) | List Item | Вставляет заданный List Item по указанному индексу. |
insert List Item(childIndex, text) | List Item | Создает и вставляет новый List Item по указанному индексу, содержащий указанное текстовое содержимое. |
insert Page Break(childIndex) | Page Break | Создает и вставляет новый Page Break по указанному индексу. |
insert Page Break(childIndex, pageBreak) | Page Break | Вставляет заданный Page Break по указанному индексу. |
insert Paragraph(childIndex, paragraph) | Paragraph | Вставляет указанный Paragraph по указанному индексу. |
insert Paragraph(childIndex, text) | Paragraph | Создает и вставляет новый Paragraph по указанному индексу, содержащий указанное текстовое содержимое. |
insert Table(childIndex) | Table | Создает и вставляет новую Table по указанному индексу. |
insert Table(childIndex, cells) | Table | Создает и вставляет новую Table , содержащую указанные ячейки, по указанному индексу. |
insert Table(childIndex, table) | Table | Вставляет заданную Table по указанному индексу. |
remove Child(child) | Body | Удаляет указанный дочерний элемент. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Body | Задает атрибуты элемента. |
set Heading Attributes(paragraphHeading, attributes) | Body | Задает атрибуты для указанного Paragraph Heading . |
set Margin Bottom(marginBottom) | Body | Задает нижний отступ в пунктах. |
set Margin Left(marginLeft) | Body | Задает левый отступ в пунктах. |
set Margin Right(marginRight) | Body | Устанавливает правый отступ в пунктах. |
set Margin Top(marginTop) | Body | Устанавливает верхний отступ. |
set Page Height(pageHeight) | Body | Задает высоту страницы в пунктах. |
set Page Width(pageWidth) | Body | Задает ширину страницы в пунктах. |
set Text(text) | Body | Преобразует содержимое в обычный текст. |
set Text Alignment(textAlignment) | Body | Задает выравнивание текста. |
Bookmark
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get Id() | String | Получает идентификатор Bookmark . |
get Position() | Position | Получает Position Bookmark на Document Tab . |
remove() | void | Удаляет Bookmark . |
Container Element
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
as Body() | Body | Возвращает текущий элемент в виде Body . |
as Equation() | Equation | Возвращает текущий элемент в виде Equation . |
as Footer Section() | Footer Section | Возвращает текущий элемент в качестве Footer Section . |
as Footnote Section() | Footnote Section | Возвращает текущий элемент в виде Footnote Section . |
as Header Section() | Header Section | Возвращает текущий элемент в виде Header Section . |
as List Item() | List Item | Возвращает текущий элемент в виде List Item . |
as Paragraph() | Paragraph | Возвращает текущий элемент в виде Paragraph . |
as Table() | Table | Возвращает текущий элемент в виде Table . |
as Table Cell() | Table Cell | Возвращает текущий элемент в виде Table Cell . |
as Table Of Contents() | Table Of Contents | Возвращает текущий элемент в виде Table Of Contents . |
as Table Row() | Table Row | Возвращает текущий элемент в виде Table Row . |
clear() | Container Element | Очищает содержимое элемента. |
copy() | Container Element | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Link Url() | String|null | Получает URL-адрес ссылки. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Num Children() | Integer | Получает количество детей. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Container Element |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Container Element |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Container Element | Задает атрибуты элемента. |
set Link Url(url) | Container Element | Задает URL-адрес ссылки. |
set Text Alignment(textAlignment) | Container Element | Задает выравнивание текста. |
Date
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Date | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Display Text() | String | Возвращает отображаемое значение, которое отображается в документе. |
get Locale() | String | Возвращает локаль даты, использованную для отображения значения. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Timestamp() | Date | Возвращает метку времени, связанную с датой. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Date |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Date |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Date | Задает атрибуты элемента. |
Document
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
add Bookmark(position) | Bookmark | Добавляет Bookmark в указанное Position на первую вкладку или, для скриптов, привязанных к документу, на активную вкладку. |
add Editor(emailAddress) | Document | Добавляет указанного пользователя в список редакторов Document . |
add Editor(user) | Document | Добавляет указанного пользователя в список редакторов Document . |
add Editors(emailAddresses) | Document | Добавляет указанный массив пользователей в список редакторов Document . |
add Footer() | Footer Section | Добавляет раздел нижнего колонтитула, если таковой отсутствует, на первую вкладку или, для скриптов, привязанных к документу, на активную вкладку. |
add Header() | Header Section | Добавляет раздел заголовка, если таковой отсутствует, на первую вкладку или, для скриптов, привязанных к документу, на активную вкладку. |
add Named Range(name, range) | Named Range | Добавляет Named Range ( Range , имеющий имя и идентификатор для последующего извлечения) на первую вкладку или, для скриптов, привязанных к документу, на активную вкладку. |
add Viewer(emailAddress) | Document | Добавляет указанного пользователя в список пользователей, просматривающих Document . |
add Viewer(user) | Document | Добавляет указанного пользователя в список пользователей, просматривающих Document . |
add Viewers(emailAddresses) | Document | Добавляет указанный массив пользователей в список пользователей, просматривающих Document . |
get Active Tab() | Tab |null | Получает текущую активную Tab пользователя в документе. |
get As(contentType) | Blob | Извлекает содержимое текущего Document в виде двоичного объекта указанного типа. |
get Blob() | Blob | Извлекает содержимое текущего Document в виде двоичного объекта (blob). |
get Body() | Body | Извлекает Body первой вкладки или, для скриптов, связанных с документом, Document Body Section " активной вкладки. |
get Bookmark(id) | Bookmark |null | Получает Bookmark с заданным ID на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
get Bookmarks() | Bookmark[] | Получает все объекты Bookmark на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
get Cursor() | Position |null | Перемещает курсор пользователя в активную вкладку. |
get Editors() | User[] | Получает список редакторов для этого Document . |
get Footer() | Footer Section |null | Извлекает нижний колонтитул первой вкладки или, для скриптов, привязанных к документу, нижний колонтитул активной вкладки. |
get Footnotes() | Footnote[] | Извлекает все элементы Footnote из тела первой вкладки или, для скриптов, привязанных к документу, из тела активной вкладки. |
get Header() | Header Section |null | Извлекает заголовок первой вкладки или, для скриптов, привязанных к документу, заголовок активной вкладки. |
get Id() | String | Получает уникальный идентификатор документа. |
get Language() | String|null | Получает код языка документа. |
get Name() | String | Извлекает заголовок документа. |
get Named Range By Id(id) | Named Range |null | Получает Named Range с заданным идентификатором на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
get Named Ranges() | Named Range[] | Получает все объекты Named Range на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
get Named Ranges(name) | Named Range[] | Получает все объекты Named Range с заданным именем на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
get Selection() | Range |null | Получает выбранный пользователем элемент на активной вкладке. |
get Supported Language Codes() | String[] | Получает все коды языков, поддерживаемые в файлах Google Docs. |
get Tab(tabId) | Tab |null | Получает Tab с указанным ID. |
get Tabs() | Tab[] | Получает все невложенные Tab , являющиеся частью документа. |
get Url() | String | Получает URL-адрес для доступа к текущему документу. |
get Viewers() | User[] | Получает список зрителей и комментаторов для этого Document . |
new Position(element, offset) | Position | Создает новую Position , которая представляет собой ссылку на местоположение на вкладке относительно определенного элемента на первой вкладке или, для скриптов, привязанных к документу, активной вкладки. |
new Range() | Range Builder | Создает конструктор, используемый для построения объектов Range из элементов вкладок на первой вкладке или, для скриптов, привязанных к документу, на активной вкладке. |
remove Editor(emailAddress) | Document | Удаляет указанного пользователя из списка редакторов Document . |
remove Editor(user) | Document | Удаляет указанного пользователя из списка редакторов Document . |
remove Viewer(emailAddress) | Document | Удаляет указанного пользователя из списка пользователей, просматривающих Document и оставляющих комментарии. |
remove Viewer(user) | Document | Удаляет указанного пользователя из списка пользователей, просматривающих Document и оставляющих комментарии. |
save And Close() | void | Сохраняет текущий Document . |
set Active Tab(tabId) | void | Устанавливает Tab , выбранную пользователем в текущем документе, на вкладку с указанным идентификатором. |
set Cursor(position) | Document | Устанавливает курсор пользователя, задав его Position . |
set Language(languageCode) | Document | Устанавливает языковой код документа. |
set Name(name) | Document | Задает заголовок документа. |
set Selection(range) | Document | Устанавливает выбранный пользователем элемент на активной вкладке, задав Range . |
Document App
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
Attribute | Attribute | Перечисление Attribute . |
Element Type | Element Type | Перечисление Element Type . |
Font Family | | Перечень шрифтов . |
Glyph Type | Glyph Type | Перечисление Glyph Type . |
Horizontal Alignment | Horizontal Alignment | Перечисление Horizontal Alignment . |
Paragraph Heading | Paragraph Heading | Перечень Paragraph Heading . |
Positioned Layout | Positioned Layout | Перечисление Positioned Layout . |
Text Alignment | Text Alignment | Перечисление Text Alignment . |
Vertical Alignment | Vertical Alignment | Перечисление Vertical Alignment . |
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
create(name) | Document | Создает и возвращает новый документ. |
get Active Document() | Document | Возвращает документ, к которому привязан скрипт в качестве контейнера . |
get Ui() | Ui | Возвращает экземпляр пользовательского интерфейса документа, позволяющий скрипту добавлять такие элементы, как меню, диалоговые окна и боковые панели. |
open By Id(id) | Document | Возвращает документ с указанным идентификатором. |
open By Url(url) | Document | Открывает и возвращает документ по указанному URL-адресу. |
Document Tab
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
add Bookmark(position) | Bookmark | Добавляет Bookmark в указанное Position . |
add Footer() | Footer Section | Добавляет раздел в нижнем колонтитуле вкладки, если такового нет. |
add Header() | Header Section | Добавляет раздел заголовка вкладки, если такового нет. |
add Named Range(name, range) | Named Range | Добавляет Named Range , который представляет собой Range , имеющий имя и идентификатор для последующего извлечения данных. |
get Body() | Body | Получает Body вкладки. |
get Bookmark(id) | Bookmark |null | Получает Bookmark с заданным идентификатором. |
get Bookmarks() | Bookmark[] | Получает все объекты Bookmark на вкладке. |
get Footer() | Footer Section |null | Получает нижнюю часть вкладки, если она существует. |
get Footnotes() | Footnote[] |null | Извлекает все элементы Footnote из содержимого вкладки. |
get Header() | Header Section |null | Получает заголовок вкладки, если он существует. |
get Named Range By Id(id) | Named Range |null | Получает Named Range с заданным идентификатором. |
get Named Ranges() | Named Range[] | Получает все объекты Named Range на вкладке. |
get Named Ranges(name) | Named Range[] | Получает все объекты Named Range на вкладке с заданным именем. |
new Position(element, offset) | Position | Создает новый Position , который представляет собой ссылку на местоположение на вкладке относительно конкретного элемента. |
new Range() | Range Builder | Создает конструктор, используемый для построения объектов Range из элементов вкладок. |
Element
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
as Body() | Body | Возвращает текущий элемент в виде Body . |
as Date() | Date | Возвращает текущий элемент в виде Date . |
as Equation() | Equation | Возвращает текущий элемент в виде Equation . |
as Equation Function() | Equation Function | Возвращает текущий элемент в виде Equation Function . |
as Equation Function Argument Separator() | Equation Function Argument Separator | Возвращает текущий элемент в виде Equation Function Argument Separator . |
as Equation Symbol() | Equation Symbol | Возвращает текущий элемент в виде Equation Symbol . |
as Footer Section() | Footer Section | Возвращает текущий элемент в качестве Footer Section . |
as Footnote() | Footnote | Возвращает текущий элемент в виде Footnote . |
as Footnote Section() | Footnote Section | Возвращает текущий элемент в виде Footnote Section . |
as Header Section() | Header Section | Возвращает текущий элемент в виде Header Section . |
as Horizontal Rule() | Horizontal Rule | Возвращает текущий элемент в виде Horizontal Rule . |
as Inline Drawing() | Inline Drawing | Возвращает текущий элемент в виде Inline Drawing . |
as Inline Image() | Inline Image | Возвращает текущий элемент в виде Inline Image . |
as List Item() | List Item | Возвращает текущий элемент в виде List Item . |
as Page Break() | Page Break | Возвращает текущий элемент в качестве Page Break . |
as Paragraph() | Paragraph | Возвращает текущий элемент в виде Paragraph . |
as Person() | Person | Возвращает текущий элемент в виде Person . |
as Rich Link() | Rich Link | Возвращает текущий элемент в виде Rich Link , например, ссылку на файл Google Sheets. |
as Table() | Table | Возвращает текущий элемент в виде Table . |
as Table Cell() | Table Cell | Возвращает текущий элемент в виде Table Cell . |
as Table Of Contents() | Table Of Contents | Возвращает текущий элемент в виде Table Of Contents . |
as Table Row() | Table Row | Возвращает текущий элемент в виде Table Row . |
as Text() | Text | Возвращает текущий элемент в виде Text . |
copy() | Element | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Element |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Element |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Element | Задает атрибуты элемента. |
Element Type
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
BODY_SECTION | Enum | Тип, соответствующий элементу Body . |
COMMENT_SECTION | Enum | Тип, соответствующий элементу « . |
DATE | Enum | Тип, соответствующий элементу Date . |
EQUATION | Enum | Тип, соответствующий элементу Equation . |
EQUATION_FUNCTION | Enum | Тип, соответствующий элементу Equation Function . |
EQUATION_FUNCTION_ARGUMENT_SEPARATOR | Enum | Тип, соответствующий элементу « Equation Function Argument Separator . |
EQUATION_SYMBOL | Enum | Тип, соответствующий элементу Equation Symbol . |
RICH_LINK | Enum | Тип, соответствующий элементу Rich Link . |
FOOTER_SECTION | Enum | Тип, соответствующий элементу Footer Section . |
FOOTNOTE | Enum | Тип, соответствующий элементу Footnote . |
FOOTNOTE_SECTION | Enum | Тип, соответствующий элементу Footnote Section . |
HEADER_SECTION | Enum | Тип, соответствующий элементу Header Section . |
HORIZONTAL_RULE | Enum | Тип, соответствующий элементу Horizontal Rule . |
INLINE_DRAWING | Enum | Тип, соответствующий элементу Inline Drawing . |
INLINE_IMAGE | Enum | Тип, соответствующий элементу Inline Image . |
LIST_ITEM | Enum | Тип, соответствующий элементу List Item . |
PAGE_BREAK | Enum | Тип, соответствующий элементу « Page Break . |
PARAGRAPH | Enum | Тип, соответствующий элементу Paragraph . |
PERSON | Enum | Тип, соответствующий элементу Person . |
TABLE | Enum | Тип, соответствующий элементу Table . |
TABLE_CELL | Enum | Тип, соответствующий элементу Table Cell . |
TABLE_OF_CONTENTS | Enum | Тип, соответствующий элементу Table Of Contents . |
TABLE_ROW | Enum | Тип, соответствующий элементу Table Row . |
TEXT | Enum | Тип, соответствующий Text элементу. |
UNSUPPORTED | Enum | Тип, соответствующий Unsupported Element . |
Equation
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
clear() | Equation | Очищает содержимое элемента. |
copy() | Equation | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Link Url() | String|null | Получает URL-адрес ссылки. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Num Children() | Integer | Получает количество детей. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Equation |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Equation |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Equation | Задает атрибуты элемента. |
set Link Url(url) | Equation | Задает URL-адрес ссылки. |
set Text Alignment(textAlignment) | Equation | Задает выравнивание текста. |
Equation Function
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
clear() | Equation Function | Очищает содержимое элемента. |
copy() | Equation Function | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Code() | String | Получает код, соответствующий функции уравнения. |
get Link Url() | String|null | Получает URL-адрес ссылки. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Num Children() | Integer | Получает количество детей. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Equation Function |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Equation Function |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Equation Function | Задает атрибуты элемента. |
set Link Url(url) | Equation Function | Задает URL-адрес ссылки. |
set Text Alignment(textAlignment) | Equation Function | Задает выравнивание текста. |
Equation Function Argument Separator
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Equation Function Argument Separator | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Equation Function Argument Separator |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Equation Function Argument Separator |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Equation Function Argument Separator | Задает атрибуты элемента. |
Equation Symbol
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Equation Symbol | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Code() | String | Извлекает код, соответствующий символу уравнения. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Equation Symbol |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Equation Symbol |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Equation Symbol | Задает атрибуты элемента. |
Font Family
Footer Section
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Horizontal Rule() | Horizontal Rule | Создает и добавляет новую Horizontal Rule . |
append Image(image) | Inline Image | Создает и добавляет новое Inline Image из указанного блока изображений. |
append Image(image) | Inline Image | Добавляет заданное Inline Image . |
append List Item(listItem) | List Item | Добавляет указанный List Item . |
append List Item(text) | List Item | Создает и добавляет новый List Item содержащий указанное текстовое содержимое. |
append Paragraph(paragraph) | Paragraph | Добавляет данный Paragraph . |
append Paragraph(text) | Paragraph | Создает и добавляет новый Paragraph содержащий указанное текстовое содержимое. |
append Table() | Table | Создает и добавляет новую Table . |
append Table(cells) | Table | Добавляет новую Table содержащую Table Cell для каждого указанного строкового значения. |
append Table(table) | Table | Добавляет данные Table . |
clear() | Footer Section | Очищает содержимое элемента. |
copy() | Footer Section | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Images() | Inline Image[] |null | Извлекает все Inline Images содержащиеся в разделе. |
get List Items() | List Item[] |null | Извлекает все List Items содержащиеся в разделе. |
get Num Children() | Integer | Получает количество детей. |
get Paragraphs() | Paragraph[] |null | Извлекает все Paragraphs содержащиеся в разделе (включая List Items ). |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Tables() | Table[] |null | Извлекает все Tables содержащиеся в данном разделе. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
insert Horizontal Rule(childIndex) | Horizontal Rule | Создает и вставляет новую Horizontal Rule по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Создает и вставляет Inline Image из указанного блока изображений по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Вставляет заданное Inline Image по указанному индексу. |
insert List Item(childIndex, listItem) | List Item | Вставляет заданный List Item по указанному индексу. |
insert List Item(childIndex, text) | List Item | Создает и вставляет новый List Item по указанному индексу, содержащий указанное текстовое содержимое. |
insert Paragraph(childIndex, paragraph) | Paragraph | Вставляет указанный Paragraph по указанному индексу. |
insert Paragraph(childIndex, text) | Paragraph | Создает и вставляет новый Paragraph по указанному индексу, содержащий указанное текстовое содержимое. |
insert Table(childIndex) | Table | Создает и вставляет новую Table по указанному индексу. |
insert Table(childIndex, cells) | Table | Создает и вставляет новую Table , содержащую указанные ячейки, по указанному индексу. |
insert Table(childIndex, table) | Table | Вставляет заданную Table по указанному индексу. |
remove Child(child) | Footer Section | Удаляет указанный дочерний элемент. |
remove From Parent() | Footer Section |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Footer Section | Задает атрибуты элемента. |
set Text(text) | Footer Section | Преобразует содержимое в обычный текст. |
set Text Alignment(textAlignment) | Footer Section | Задает выравнивание текста. |
Footnote
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Footnote | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Footnote Contents() | Footnote Section |null | Извлекает содержимое элемента сноски. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
remove From Parent() | Footnote |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Footnote | Задает атрибуты элемента. |
Footnote Section
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Paragraph(paragraph) | Paragraph | Добавляет данный Paragraph . |
append Paragraph(text) | Paragraph | Создает и добавляет новый Paragraph содержащий указанное текстовое содержимое. |
clear() | Footnote Section | Очищает содержимое элемента. |
copy() | Footnote Section | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Num Children() | Integer | Получает количество детей. |
get Paragraphs() | Paragraph[] |null | Извлекает все Paragraphs содержащиеся в разделе (включая List Items ). |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
insert Paragraph(childIndex, paragraph) | Paragraph | Вставляет указанный Paragraph по указанному индексу. |
insert Paragraph(childIndex, text) | Paragraph | Создает и вставляет новый Paragraph по указанному индексу, содержащий указанное текстовое содержимое. |
remove Child(child) | Footnote Section | Удаляет указанный дочерний элемент. |
remove From Parent() | Footnote Section |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Footnote Section | Задает атрибуты элемента. |
set Text(text) | Footnote Section | Преобразует содержимое в обычный текст. |
set Text Alignment(textAlignment) | Footnote Section | Задает выравнивание текста. |
Glyph Type
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
BULLET | Enum | Стандартный маркер списка, круглый и закрашенный. |
HOLLOW_BULLET | Enum | Полая пуля. |
SQUARE_BULLET | Enum | Квадратная пуля. |
NUMBER | Enum | Числовой маркер. |
LATIN_UPPER | Enum | Буква, написанная заглавными буквами на латыни. |
LATIN_LOWER | Enum | Пуля, написанная строчными буквами на латыни. |
ROMAN_UPPER | Enum | Римская цифра, заглавная буква. |
ROMAN_LOWER | Enum | Римская цифра, строчная буква. |
Header Section
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Horizontal Rule() | Horizontal Rule | Создает и добавляет новую Horizontal Rule . |
append Image(image) | Inline Image | Создает и добавляет новое Inline Image из указанного блока изображений. |
append Image(image) | Inline Image | Добавляет заданное Inline Image . |
append List Item(listItem) | List Item | Добавляет указанный List Item . |
append List Item(text) | List Item | Создает и добавляет новый List Item содержащий указанное текстовое содержимое. |
append Paragraph(paragraph) | Paragraph | Добавляет данный Paragraph . |
append Paragraph(text) | Paragraph | Создает и добавляет новый Paragraph содержащий указанное текстовое содержимое. |
append Table() | Table | Создает и добавляет новую Table . |
append Table(cells) | Table | Добавляет новую Table содержащую Table Cell для каждого указанного строкового значения. |
append Table(table) | Table | Добавляет данные Table . |
clear() | Header Section | Очищает содержимое элемента. |
copy() | Header Section | Возвращает отсоединенную, глубокую копию текущего элемента. |
edit As Text() | Text | Получает Text версию текущего элемента для редактирования. |
find Element(elementType) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа. |
find Element(elementType, from) | Range Element |null | Выполняет поиск в содержимом элемента потомка указанного типа, начиная с указанного Range Element . |
find Text(searchPattern) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента с использованием регулярных выражений. |
find Text(searchPattern, from) | Range Element |null | Выполняет поиск указанного текстового шаблона в содержимом элемента, начиная с заданного результата поиска. |
get Attributes() | Object | Получает атрибуты элемента. |
get Child(childIndex) | Element | Извлекает дочерний элемент по указанному индексу дочернего элемента. |
get Child Index(child) | Integer | Получает индекс дочернего элемента для указанного дочернего элемента. |
get Images() | Inline Image[] |null | Извлекает все Inline Images содержащиеся в разделе. |
get List Items() | List Item[] |null | Извлекает все List Items содержащиеся в разделе. |
get Num Children() | Integer | Получает количество детей. |
get Paragraphs() | Paragraph[] |null | Извлекает все Paragraphs содержащиеся в разделе (включая List Items ). |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Tables() | Table[] |null | Извлекает все Tables содержащиеся в данном разделе. |
get Text() | String | Извлекает содержимое элемента в виде текстовой строки. |
get Text Alignment() | Text Alignment |null | Получает выравнивание текста. |
get Type() | Element Type | Получает Element Type элемента. |
insert Horizontal Rule(childIndex) | Horizontal Rule | Создает и вставляет новую Horizontal Rule по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Создает и вставляет Inline Image из указанного блока изображений по указанному индексу. |
insert Image(childIndex, image) | Inline Image | Вставляет заданное Inline Image по указанному индексу. |
insert List Item(childIndex, listItem) | List Item | Вставляет заданный List Item по указанному индексу. |
insert List Item(childIndex, text) | List Item | Создает и вставляет новый List Item по указанному индексу, содержащий указанное текстовое содержимое. |
insert Paragraph(childIndex, paragraph) | Paragraph | Вставляет указанный Paragraph по указанному индексу. |
insert Paragraph(childIndex, text) | Paragraph | Создает и вставляет новый Paragraph по указанному индексу, содержащий указанное текстовое содержимое. |
insert Table(childIndex) | Table | Создает и вставляет новую Table по указанному индексу. |
insert Table(childIndex, cells) | Table | Создает и вставляет новую Table , содержащую указанные ячейки, по указанному индексу. |
insert Table(childIndex, table) | Table | Вставляет заданную Table по указанному индексу. |
remove Child(child) | Header Section | Удаляет указанный дочерний элемент. |
remove From Parent() | Header Section |null | Удаляет элемент из родительского элемента. |
replace Text(searchPattern, replacement) | Element | Заменяет все вхождения заданного текстового шаблона заданной строкой замены, используя регулярные выражения. |
set Attributes(attributes) | Header Section | Задает атрибуты элемента. |
set Text(text) | Header Section | Преобразует содержимое в обычный текст. |
set Text Alignment(textAlignment) | Header Section | Задает выравнивание текста. |
Horizontal Alignment
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
LEFT | Enum | Параметр выравнивания по левому краю. |
CENTER | Enum | Вариант выравнивания по центру. |
RIGHT | Enum | Вариант выравнивания по правому краю. |
JUSTIFY | Enum | Параметр выравнивания по ширине. |
Horizontal Rule
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Horizontal Rule | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Attributes() | Object | Получает атрибуты элемента. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
remove From Parent() | Horizontal Rule |null | Удаляет элемент из родительского элемента. |
set Attributes(attributes) | Horizontal Rule | Задает атрибуты элемента. |
Inline Drawing
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Inline Drawing | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Alt Description() | String|null | Возвращает альтернативное описание рисунка. |
get Alt Title() | String|null | Возвращает альтернативное название рисунка. |
get Attributes() | Object | Получает атрибуты элемента. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
is At Document End() | Boolean | Определяет, находится ли элемент в конце Document . |
merge() | Inline Drawing |null | Объединяет элемент с предшествующим соседним элементом того же типа. |
remove From Parent() | Inline Drawing |null | Удаляет элемент из родительского элемента. |
set Alt Description(description) | Inline Drawing | Задает альтернативное описание рисунка. |
set Alt Title(title) | Inline Drawing | Задает альтернативное название рисунка. |
set Attributes(attributes) | Inline Drawing | Задает атрибуты элемента. |
Inline Image
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Inline Image | Возвращает отсоединенную, глубокую копию текущего элемента. |
get Alt Description() | String|null | Возвращает альтернативное описание изображения. |
get Alt Title() | String|null | Возвращает альтернативное название изображения. |
get As(contentType) | Blob | Возвращает данные, содержащиеся в этом объекте, в виде двоичных данных (blob), преобразованных в указанный тип содержимого. |
get Attributes() | Object | Получает атрибуты элемента. |
get Blob() | Blob | Возвращает данные, содержащиеся в этом объекте, в виде двоичных данных (blob). |
get Height() | Integer | Извлекает высоту изображения в пикселях. |
get Link Url() | String|null | Получает URL-адрес ссылки. |
get Next Sibling() | Element |null | Получает следующий соседний элемент. |
get Parent() | Container Element |null | Получает родительский элемент элемента. |
get Previous Sibling() | Element |null | Получает предыдущий соседний элемент. |
get Type() | Element Type | Получает Element Type элемента. |
get Width() | Integer | Получает ширину изображения в пикселях. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Inline Image |null | Merges the element with the preceding sibling of the same type. |
remove From Parent() | Inline Image |null | Removes the element from its parent. |
set Alt Description(description) | Inline Image | Sets the image's alternate description. |
set Alt Title(title) | Inline Image | Sets the image's alternate title. |
set Attributes(attributes) | Inline Image | Sets the element's attributes. |
set Height(height) | Inline Image | Sets the image's height, in pixels. |
set Link Url(url) | Inline Image | Sets the link URL. |
set Width(width) | Inline Image | Sets the image's width, in pixels. |
List Item
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
add Positioned Image(image) | Positioned Image | Creates and inserts a new Positioned Image from the specified image blob. |
append Horizontal Rule() | Horizontal Rule | Creates and appends a new Horizontal Rule . |
append Inline Image(image) | Inline Image | Creates and appends a new Inline Image from the specified image blob. |
append Inline Image(image) | Inline Image | Appends the given Inline Image . |
append Page Break() | Page Break | Creates and appends a new Page Break . |
append Page Break(pageBreak) | Page Break | Appends the given Page Break . |
append Text(text) | Text | Creates and appends a new Text element with the specified contents. |
append Text(text) | Text | Appends the given Text element. |
clear() | List Item | Clears the contents of the element. |
copy() | List Item | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Alignment() | Horizontal Alignment |null | Retrieves the Horizontal Alignment . |
get Attributes() | Object | Retrieves the element's attributes. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Glyph Type() | Glyph Type |null | Retrieves the list item's Glyph Type . |
get Heading() | Paragraph Heading |null | Retrieves the Paragraph Heading . |
get Indent End() | Number|null | Retrieves the end indentation, in points. |
get Indent First Line() | Number|null | Retrieves the first line indentation, in points. |
get Indent Start() | Number|null | Retrieves the start indentation. |
get Line Spacing() | Number|null | Retrieves the line spacing, in points. |
get Link Url() | String|null | Retrieves the link url. |
get List Id() | String|null | Retrieves the list ID. |
get Nesting Level() | Integer | Retrieves the list item's nesting level. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Children() | Integer | Retrieves the number of children. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Positioned Image(id) | Positioned Image | Gets a Positioned Image by the image's ID. |
get Positioned Images() | Positioned Image[] | Gets all Positioned Image objects anchored to the paragraph. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Spacing After() | Number|null | Retrieves the spacing after the element, in points. |
get Spacing Before() | Number|null | Retrieves the spacing before the element, in points. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
insert Horizontal Rule(childIndex) | Horizontal Rule | Creates and inserts a Horizontal Rule at the specified index. |
insert Inline Image(childIndex, image) | Inline Image | Creates and inserts a new Inline Image from the specified image blob, at the specified index. |
insert Inline Image(childIndex, image) | Inline Image | Inserts the given Inline Image at the specified index. |
insert Page Break(childIndex) | Page Break | Creates and inserts a new Page Break at the specified index. |
insert Page Break(childIndex, pageBreak) | Page Break | Inserts the given Page Break at the specified index. |
insert Text(childIndex, text) | Text | Creates and inserts a new text element at the specified index. |
insert Text(childIndex, text) | Text | Inserts the given Text element at the specified index, with the specified text contents. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
is Left To Right() | Boolean|null | Retrieves the left-to-right setting. |
merge() | List Item |null | Merges the element with the preceding sibling of the same type. |
remove Child(child) | List Item | Removes the specified child element. |
remove From Parent() | List Item |null | Removes the element from its parent. |
remove Positioned Image(id) | Boolean | Removes a Positioned Image by the image's ID. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Alignment(alignment) | List Item | Sets the Horizontal Alignment . |
set Attributes(attributes) | List Item | Sets the element's attributes. |
set Glyph Type(glyphType) | List Item | Sets the list item's Glyph Type . |
set Heading(heading) | List Item | Sets the Paragraph Heading . |
set Indent End(indentEnd) | List Item | Sets the end indentation, in points. |
set Indent First Line(indentFirstLine) | List Item | Sets the first line indentation, in points. |
set Indent Start(indentStart) | List Item | Sets the start indentation, in points. |
set Left To Right(leftToRight) | List Item | Sets the left-to-right setting. |
set Line Spacing(multiplier) | List Item | Sets the line spacing, as a quantity indicating the number of lines to use for spacing. |
set Link Url(url) | List Item | Sets the link url. |
set List Id(listItem) | List Item | Sets the list ID. |
set Nesting Level(nestingLevel) | List Item | Sets the list item's nesting level. |
set Spacing After(spacingAfter) | List Item | Sets the spacing after the element, in points. |
set Spacing Before(spacingBefore) | List Item | Sets the spacing before the element, in points. |
set Text(text) | void | Sets the contents of the list item as text. |
set Text Alignment(textAlignment) | List Item | Sets the text alignment. |
Named Range
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get Id() | String | Gets the ID of this Named Range . |
get Name() | String | Gets the name of this Named Range . |
get Range() | Range | Gets the range of elements associated with this Named Range . |
remove() | void | Removes this Named Range from the tab. |
Page Break
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Page Break | Returns a detached, deep copy of the current element. |
get Attributes() | Object | Retrieves the element's attributes. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Type() | Element Type | Retrieves the element's Element Type . |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
remove From Parent() | Page Break |null | Removes the element from its parent. |
set Attributes(attributes) | Page Break | Sets the element's attributes. |
Paragraph
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
add Positioned Image(image) | Positioned Image | Creates and inserts a new Positioned Image from the specified image blob. |
append Horizontal Rule() | Horizontal Rule | Creates and appends a new Horizontal Rule . |
append Inline Image(image) | Inline Image | Creates and appends a new Inline Image from the specified image blob. |
append Inline Image(image) | Inline Image | Appends the given Inline Image . |
append Page Break() | Page Break | Creates and appends a new Page Break . |
append Page Break(pageBreak) | Page Break | Appends the given Page Break . |
append Text(text) | Text | Creates and appends a new Text element with the specified contents. |
append Text(text) | Text | Appends the given Text element. |
clear() | Paragraph | Clears the contents of the element. |
copy() | Paragraph | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Alignment() | Horizontal Alignment |null | Retrieves the Horizontal Alignment . |
get Attributes() | Object | Retrieves the element's attributes. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Heading() | Paragraph Heading |null | Retrieves the Paragraph Heading . |
get Indent End() | Number|null | Retrieves the end indentation, in points. |
get Indent First Line() | Number|null | Retrieves the first line indentation, in points. |
get Indent Start() | Number|null | Retrieves the start indentation. |
get Line Spacing() | Number|null | Retrieves the line spacing, in points. |
get Link Url() | String|null | Retrieves the link url. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Children() | Integer | Retrieves the number of children. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Positioned Image(id) | Positioned Image | Gets a Positioned Image by the image's ID. |
get Positioned Images() | Positioned Image[] | Gets all Positioned Image objects anchored to the paragraph. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Spacing After() | Number|null | Retrieves the spacing after the element, in points. |
get Spacing Before() | Number|null | Retrieves the spacing before the element, in points. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
insert Horizontal Rule(childIndex) | Horizontal Rule | Creates and inserts a Horizontal Rule at the specified index. |
insert Inline Image(childIndex, image) | Inline Image | Creates and inserts a new Inline Image from the specified image blob, at the specified index. |
insert Inline Image(childIndex, image) | Inline Image | Inserts the given Inline Image at the specified index. |
insert Page Break(childIndex) | Page Break | Creates and inserts a new Page Break at the specified index. |
insert Page Break(childIndex, pageBreak) | Page Break | Inserts the given Page Break at the specified index. |
insert Text(childIndex, text) | Text | Creates and inserts a new text element at the specified index. |
insert Text(childIndex, text) | Text | Inserts the given Text element at the specified index, with the specified text contents. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
is Left To Right() | Boolean|null | Retrieves the left-to-right setting. |
merge() | Paragraph |null | Merges the element with the preceding sibling of the same type. |
remove Child(child) | Paragraph | Removes the specified child element. |
remove From Parent() | Paragraph |null | Removes the element from its parent. |
remove Positioned Image(id) | Boolean | Removes a Positioned Image by the image's ID. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Alignment(alignment) | Paragraph | Sets the Horizontal Alignment . |
set Attributes(attributes) | Paragraph | Sets the element's attributes. |
set Heading(heading) | Paragraph | Sets the Paragraph Heading . |
set Indent End(indentEnd) | Paragraph | Sets the end indentation, in points. |
set Indent First Line(indentFirstLine) | Paragraph | Sets the first line indentation, in points. |
set Indent Start(indentStart) | Paragraph | Sets the start indentation, in points. |
set Left To Right(leftToRight) | Paragraph | Sets the left-to-right setting. |
set Line Spacing(multiplier) | Paragraph | Sets the line spacing, as a quantity indicating the number of lines to use for spacing. |
set Link Url(url) | Paragraph | Sets the link url. |
set Spacing After(spacingAfter) | Paragraph | Sets the spacing after the element, in points. |
set Spacing Before(spacingBefore) | Paragraph | Sets the spacing before the element, in points. |
set Text(text) | void | Sets the contents of the paragraph as text. |
set Text Alignment(textAlignment) | Paragraph | Sets the text alignment. |
Paragraph Heading
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
NORMAL | Enum | The heading option for normal text. |
HEADING1 | Enum | The highest heading option. |
HEADING2 | Enum | The second heading option. |
HEADING3 | Enum | The third heading option |
HEADING4 | Enum | The fourth heading option. |
HEADING5 | Enum | The fifth heading option. |
HEADING6 | Enum | The lowest heading option. |
TITLE | Enum | The title heading option. |
SUBTITLE | Enum | The subtitle heading option. |
Person
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Person | Returns a detached, deep copy of the current element. |
get Attributes() | Object | Retrieves the element's attributes. |
get Email() | String | Returns the person's email address. |
get Name() | String|null | Returns the person's display name, if set. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Type() | Element Type | Retrieves the element's Element Type . |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Person |null | Merges the element with the preceding sibling of the same type. |
remove From Parent() | Person |null | Removes the element from its parent. |
set Attributes(attributes) | Person | Sets the element's attributes. |
Position
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get Element() | Element | Gets the element that contains this Position . |
get Offset() | Integer | Gets this Position 's relative location within the element that contains it. |
get Surrounding Text() | Text | Creates an artificial Text element that represents the text and formatting of the Paragraph or List Item that contains the Position , either directly or through a chain of child elements. |
get Surrounding Text Offset() | Integer | Gets the offset of this Position within the Text element returned by get Surrounding Text() . |
insert Bookmark() | Bookmark | Creates and inserts a new Bookmark at this Position . |
insert Inline Image(image) | Inline Image |null | Creates and inserts a new Inline Image at this Position from the specified image blob. |
insert Text(text) | Text |null | Inserts the specified text at this Position . |
Positioned Image
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get As(contentType) | Blob | Возвращает данные, содержащиеся в этом объекте, в виде двоичных данных (blob), преобразованных в указанный тип содержимого. |
get Blob() | Blob | Возвращает данные, содержащиеся в этом объекте, в виде двоичных данных (blob). |
get Height() | Integer | Retrieves the image's height, in pixels. |
get Id() | String | Gets the image's ID. |
get Layout() | Positioned Layout | Gets an enum value that represents how the image is laid out. |
get Left Offset() | Number | Gets the image's offset, in points, from the paragraph's left. |
get Paragraph() | Paragraph | Gets the Paragraph the image is anchored to. |
get Top Offset() | Number | Gets the image's offset, in points, from the paragraph's top. |
get Width() | Integer | Retrieves the image's width, in pixels. |
set Height(height) | Positioned Image | Sets the image's height, in pixels. |
set Layout(layout) | Positioned Image | Sets the definition of how the image is laid out. |
set Left Offset(offset) | Positioned Image | Sets the image's offset, in points, from the paragraph's left. |
set Top Offset(offset) | Positioned Image | Sets the image's offset, in points, from the paragraph's top. |
set Width(width) | Positioned Image | Sets the image's width, in pixels. |
Positioned Layout
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
ABOVE_TEXT | Enum | The image is positioned above the text. |
BREAK_BOTH | Enum | The image breaks the text on the left and right. |
BREAK_LEFT | Enum | The image breaks the text on the left. |
BREAK_RIGHT | Enum | The image breaks the text on the right. |
WRAP_TEXT | Enum | The image is wrapped by text. |
Range
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get Range Elements() | Range Element[] | Gets all elements in this Range , including any partial Text elements (for example, in the case of a selection that includes only part of a Text element). |
Range Builder
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
add Element(element) | Range Builder | Adds an entire Element to this Range Builder . |
add Element(textElement, startOffset, endOffsetInclusive) | Range Builder | Adds a partial Text element to this Range Builder . |
add Elements Between(startElement, endElementInclusive) | Range Builder | Adds two entire elements, and all elements between them, to this Range Builder . |
add Elements Between(startTextElement, startOffset, endTextElementInclusive, endOffsetInclusive) | Range Builder | Adds two partial Text elements, and all elements between them, to the Range Builder . |
add Range(range) | Range Builder | Adds the contents of another Range to this Range Builder . |
build() | Range | Constructs a Range from the settings applied to the builder. |
get Range Elements() | Range Element[] | Gets all elements in this Range , including any partial Text elements (for example, in the case of a selection that includes only part of a Text element). |
Range Element
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
get Element() | Element | Gets the Element that corresponds to this Range Element . |
get End Offset Inclusive() | Integer | Gets the position of the end of a partial range within the range element. |
get Start Offset() | Integer | Gets the position of the start of a partial range within the range element. |
is Partial() | Boolean | Determines whether this range element covers the entire element or a partial selection of the element's characters. |
Rich Link
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Rich Link | Returns a detached, deep copy of the current element. |
get Attributes() | Object | Retrieves the element's attributes. |
get Mime Type() | String|null | Returns the MIME type of the link, which is available when the item is a link to a Drive file and null otherwise. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Title() | String | Returns the link's displayed title. |
get Type() | Element Type | Retrieves the element's Element Type . |
get Url() | String | Returns the URL of the resource. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Rich Link |null | Merges the element with the preceding sibling of the same type. |
remove From Parent() | Rich Link |null | Removes the element from its parent. |
set Attributes(attributes) | Rich Link | Sets the element's attributes. |
Tab
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
as Document Tab() | Document Tab | Retrieves the tab contents as a Document Tab . |
get Child Tabs() | Tab[] | Retrieves the child tabs nested within this tab. |
get Id() | String | Retrieves the ID of the tab. |
get Index() | Integer | Retrieves the 0-based index of the tab within the parent. |
get Title() | String | Retrieves the title of the tab. |
get Type() | Tab Type | Retrieves the type of tab. |
Tab Type
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
DOCUMENT_TAB | Enum | The type corresponding to Document Tab . |
Table
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Table Row() | Table Row | Creates and appends a new Table Row . |
append Table Row(tableRow) | Table Row | Appends the given Table Row . |
clear() | Table | Clears the contents of the element. |
copy() | Table | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Attributes() | Object | Retrieves the element's attributes. |
get Border Color() | String|null | Retrieves the border color. |
get Border Width() | Number|null | Retrieves the border width, in points. |
get Cell(rowIndex, cellIndex) | Table Cell |null | Retrieves the Table Cell at the specified row and cell indices. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Column Width(columnIndex) | Number|null | Retrieves the width of the specified table column, in points. |
get Link Url() | String|null | Retrieves the link url. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Children() | Integer | Retrieves the number of children. |
get Num Rows() | Integer | Retrieves the number of Table Rows . |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Row(rowIndex) | Table Row |null | Retrieves the Table Row at the specified row index. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
insert Table Row(childIndex) | Table Row | Creates and inserts a new Table Row at the specified index. |
insert Table Row(childIndex, tableRow) | Table Row | Inserts the given Table Row at the specified index. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
remove Child(child) | Table | Removes the specified child element. |
remove From Parent() | Table |null | Removes the element from its parent. |
remove Row(rowIndex) | Table Row | Removes the Table Row at the specified row index. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Attributes(attributes) | Table | Sets the element's attributes. |
set Border Color(color) | Table | Sets the border color. |
set Border Width(width) | Table | Sets the border width, in points. |
set Column Width(columnIndex, width) | Table | Sets the width of the specified column, in points. |
set Link Url(url) | Table | Sets the link url. |
set Text Alignment(textAlignment) | Table | Sets the text alignment. |
Table Cell
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Horizontal Rule() | Horizontal Rule | Creates and appends a new Horizontal Rule . |
append Image(image) | Inline Image | Creates and appends a new Inline Image from the specified image blob. |
append Image(image) | Inline Image | Appends the given Inline Image . |
append List Item(listItem) | List Item | Appends the given List Item . |
append List Item(text) | List Item | Creates and appends a new List Item . |
append Paragraph(paragraph) | Paragraph | Appends the given Paragraph . |
append Paragraph(text) | Paragraph | Creates and appends a new Paragraph . |
append Table() | Table | Creates and appends a new Table . |
append Table(cells) | Table | Appends a new Table containing the specified cells. |
append Table(table) | Table | Appends the given Table . |
clear() | Table Cell | Clears the contents of the element. |
copy() | Table Cell | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Attributes() | Object | Retrieves the element's attributes. |
get Background Color() | String|null | Retrieves the background color. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Col Span() | Integer | Retrieves the column span, which is the number of columns of table cells this cell spans. |
get Link Url() | String|null | Retrieves the link url. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Children() | Integer | Retrieves the number of children. |
get Padding Bottom() | Number|null | Retrieves the bottom padding, in points. |
get Padding Left() | Number|null | Retrieves the left padding, in points. |
get Padding Right() | Number|null | Retrieves the right padding, in points. |
get Padding Top() | Number|null | Retrieves the top padding, in points. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Parent Row() | Table Row |null | Retrieves the Table Row containing the current Table Cell . |
get Parent Table() | Table |null | Retrieves the Table containing the current Table Cell . |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Row Span() | Integer | Retrieves the row span, which is the number of rows of table cells this cell spans. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
get Vertical Alignment() | Vertical Alignment |null | Retrieves the Vertical Alignment . |
get Width() | Number|null | Retrieves the width of the column containing the cell, in points. |
insert Horizontal Rule(childIndex) | Horizontal Rule | Creates and inserts a new Horizontal Rule at the specified index. |
insert Image(childIndex, image) | Inline Image | Creates and inserts an Inline Image from the specified image blob, at the specified index. |
insert Image(childIndex, image) | Inline Image | Inserts the given Inline Image at the specified index. |
insert List Item(childIndex, listItem) | List Item | Inserts the given List Item at the specified index. |
insert List Item(childIndex, text) | List Item | Creates and inserts a new List Item at the specified index. |
insert Paragraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insert Paragraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index. |
insert Table(childIndex) | Table | Creates and inserts a new Table at the specified index. |
insert Table(childIndex, cells) | Table | Creates and inserts a new Table containing the specified cells, at the specified index. |
insert Table(childIndex, table) | Table | Inserts the given Table at the specified index. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Table Cell |null | Merges the element with the preceding sibling of the same type. |
remove Child(child) | Table Cell | Removes the specified child element. |
remove From Parent() | Table Cell |null | Removes the element from its parent. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Attributes(attributes) | Table Cell | Sets the element's attributes. |
set Background Color(color) | Table Cell | Sets the background color. |
set Link Url(url) | Table Cell | Sets the link url. |
set Padding Bottom(paddingBottom) | Table Cell | Sets the bottom padding, in points. |
set Padding Left(paddingLeft) | Table Cell | Sets the left padding, in points. |
set Padding Right(paddingRight) | Table Cell | Sets the right padding, in points. |
set Padding Top(paddingTop) | Table Cell | Sets the top padding, in points. |
set Text(text) | Table Cell | Sets the contents as plain text. |
set Text Alignment(textAlignment) | Table Cell | Sets the text alignment. |
set Vertical Alignment(alignment) | Table Cell | Sets the vertical alignment. |
set Width(width) | Table Cell | Sets the width of the column containing the current cell, in points. |
Table Of Contents
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
clear() | Table Of Contents | Clears the contents of the element. |
copy() | Table Of Contents | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Attributes() | Object | Retrieves the element's attributes. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Link Url() | String|null | Retrieves the link url. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Children() | Integer | Retrieves the number of children. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
remove From Parent() | Table Of Contents |null | Removes the element from its parent. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Attributes(attributes) | Table Of Contents | Sets the element's attributes. |
set Link Url(url) | Table Of Contents | Sets the link url. |
set Text Alignment(textAlignment) | Table Of Contents | Sets the text alignment. |
Table Row
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Table Cell() | Table Cell | Creates and appends a new Table Cell . |
append Table Cell(textContents) | Table Cell | Appends the given Table Cell containing the specified text. |
append Table Cell(tableCell) | Table Cell | Appends the given Table Cell . |
clear() | Table Row | Clears the contents of the element. |
copy() | Table Row | Returns a detached, deep copy of the current element. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Element(elementType) | Range Element |null | Searches the contents of the element for a descendant of the specified type. |
find Element(elementType, from) | Range Element |null | Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element . |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Attributes() | Object | Retrieves the element's attributes. |
get Cell(cellIndex) | Table Cell |null | Retrieves the Table Cell at the specified cell index. |
get Child(childIndex) | Element | Retrieves the child element at the specified child index. |
get Child Index(child) | Integer | Retrieves the child index for the specified child element. |
get Link Url() | String|null | Retrieves the link url. |
get Minimum Height() | Number|null | Retrieves the minimum height, in points. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Num Cells() | Integer | Retrieves the number of cells in the row. |
get Num Children() | Integer | Retrieves the number of children. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Parent Table() | Table |null | Retrieves the Table containing the current row. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Type() | Element Type | Retrieves the element's Element Type . |
insert Table Cell(childIndex) | Table Cell | Creates and inserts a new Table Cell at the specified index. |
insert Table Cell(childIndex, textContents) | Table Cell | Inserts the given Table Cell at the specified index, containing the given text. |
insert Table Cell(childIndex, tableCell) | Table Cell | Inserts the given Table Cell at the specified index. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Table Row |null | Merges the element with the preceding sibling of the same type. |
remove Cell(cellIndex) | Table Cell | Removes the Table Cell at the specified cell index. |
remove Child(child) | Table Row | Removes the specified child element. |
remove From Parent() | Table Row |null | Removes the element from its parent. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Attributes(attributes) | Table Row | Sets the element's attributes. |
set Link Url(url) | Table Row | Sets the link url. |
set Minimum Height(minHeight) | Table Row | Sets the minimum height, in points. |
set Text Alignment(textAlignment) | Table Row | Sets the text alignment. |
Text
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
append Text(text) | Text | Adds the specified text to the end of this text region. |
copy() | Text | Returns a detached, deep copy of the current element. |
delete Text(startOffset, endOffsetInclusive) | Text | Deletes a range of text. |
edit As Text() | Text | Obtains a Text version of the current element, for editing. |
find Text(searchPattern) | Range Element |null | Searches the contents of the element for the specified text pattern using regular expressions. |
find Text(searchPattern, from) | Range Element |null | Searches the contents of the element for the specified text pattern, starting from a given search result. |
get Attributes() | Object | Retrieves the element's attributes. |
get Attributes(offset) | Object | Retrieves the attributes at the specified character offset. |
get Background Color() | String|null | Retrieves the background color setting. |
get Background Color(offset) | String|null | Retrieves the background color at the specified character offset. |
get Font Family() | String|null | Retrieves the font family setting. |
get Font Family(offset) | String|null | Retrieves the font family at the specified character offset. |
get Font Size() | Number|null | Retrieves the font size setting. |
get Font Size(offset) | Number|null | Retrieves the font size at the specified character offset. |
get Foreground Color() | String|null | Retrieves the foreground color setting. |
get Foreground Color(offset) | String|null | Retrieves the foreground color at the specified character offset. |
get Link Url() | String|null | Retrieves the link url. |
get Link Url(offset) | String|null | Retrieves the link URL at the specified character offset. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Text() | String | Retrieves the contents of the element as a text string. |
get Text Alignment() | Text Alignment |null | Gets the text alignment. |
get Text Alignment(offset) | Text Alignment |null | Gets the text alignment for a single character. |
get Text Attribute Indices() | Integer[] | Retrieves the set of text indices that correspond to the start of distinct text formatting runs. |
get Type() | Element Type | Retrieves the element's Element Type . |
insert Text(offset, text) | Text | Inserts the specified text at the given character offset. |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
is Bold() | Boolean|null | Retrieves the bold setting. |
is Bold(offset) | Boolean|null | Retrieves the bold setting at the specified character offset. |
is Italic() | Boolean|null | Retrieves the italic setting. |
is Italic(offset) | Boolean|null | Retrieves the italic setting at the specified character offset. |
is Strikethrough() | Boolean|null | Retrieves the strikethrough setting. |
is Strikethrough(offset) | Boolean|null | Retrieves the strikethrough setting at the specified character offset. |
is Underline() | Boolean|null | Retrieves the underline setting. |
is Underline(offset) | Boolean|null | Retrieves the underline setting at the specified character offset. |
merge() | Text |null | Merges the element with the preceding sibling of the same type. |
remove From Parent() | Text |null | Removes the element from its parent. |
replace Text(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
set Attributes(startOffset, endOffsetInclusive, attributes) | Text | Applies the specified attributes to the given character range. |
set Attributes(attributes) | Text | Sets the element's attributes. |
set Background Color(startOffset, endOffsetInclusive, color) | Text | Sets the background color for the specified character range. |
set Background Color(color) | Text | Sets the background color. |
set Bold(bold) | Text | Sets the bold setting. |
set Bold(startOffset, endOffsetInclusive, bold) | Text | Sets the bold setting for the specified character range. |
set Font Family(startOffset, endOffsetInclusive, fontFamilyName) | Text | Sets the font family for the specified character range. |
set Font Family(fontFamilyName) | Text | Sets the font family. |
set Font Size(startOffset, endOffsetInclusive, size) | Text | Sets the font size for the specified character range. |
set Font Size(size) | Text | Задает размер шрифта. |
set Foreground Color(startOffset, endOffsetInclusive, color) | Text | Sets the foreground color for the specified character range. |
set Foreground Color(color) | Text | Sets the foreground color. |
set Italic(italic) | Text | Sets the italic setting. |
set Italic(startOffset, endOffsetInclusive, italic) | Text | Sets the italic setting for the specified character range. |
set Link Url(startOffset, endOffsetInclusive, url) | Text | Sets the link URL for the specified character range. |
set Link Url(url) | Text | Sets the link url. |
set Strikethrough(strikethrough) | Text | Sets the strikethrough setting. |
set Strikethrough(startOffset, endOffsetInclusive, strikethrough) | Text | Sets the strikethrough setting for the specified character range. |
set Text(text) | Text | Sets the text contents. |
set Text Alignment(startOffset, endOffsetInclusive, textAlignment) | Text | Sets the text alignment for a given character range. |
set Text Alignment(textAlignment) | Text | Sets the text alignment. |
set Underline(underline) | Text | Sets the underline setting. |
set Underline(startOffset, endOffsetInclusive, underline) | Text | Sets the underline setting for the specified character range. |
Text Alignment
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
NORMAL | Enum | The normal text alignment. |
SUPERSCRIPT | Enum | The superscript text alignment. |
SUBSCRIPT | Enum | The subscript text alignment. |
Unsupported Element
Методы
| Метод | Тип возвращаемого значения | Краткое описание |
|---|---|---|
copy() | Unsupported Element | Returns a detached, deep copy of the current element. |
get Attributes() | Object | Retrieves the element's attributes. |
get Next Sibling() | Element |null | Retrieves the element's next sibling element. |
get Parent() | Container Element |null | Retrieves the element's parent element. |
get Previous Sibling() | Element |null | Retrieves the element's previous sibling element. |
get Type() | Element Type | Retrieves the element's Element Type . |
is At Document End() | Boolean | Determines whether the element is at the end of the Document . |
merge() | Unsupported Element |null | Merges the element with the preceding sibling of the same type. |
remove From Parent() | Unsupported Element |null | Removes the element from its parent. |
set Attributes(attributes) | Unsupported Element | Sets the element's attributes. |
Vertical Alignment
Характеристики
| Свойство | Тип | Описание |
|---|---|---|
BOTTOM | Enum | The bottom-alignment option. |
CENTER | Enum | The center-alignment option. |
TOP | Enum | The top-alignment option. |