Таблица DocumentAPI.DateTimeCellFormatting
Таблица содержит параметры для формата ячеек таблицы типа Дата и Время, используется в качестве аргумента метода Cell:setFormat().
| Поле | Тип | Описание |
|---|---|---|
DateTimeCellFormatting.dateListID | DatePatterns | Формат даты |
DateTimeCellFormatting.timeListID | TimePatterns | Формат времени |
Пример
local table = document:getBlocks():getTable(0)
local cell = table:getCell("A1")
local dateTimeCellFormatting = DocumentAPI.DateTimeCellFormatting()
dateTimeCellFormatting.dateListID = DocumentAPI.DatePatterns_FullDate
dateTimeCellFormatting.timeListID = DocumentAPI.TimePatterns_LongTime
cell:setFormat(dateTimeCellFormatting)
print(cell:getFormattedValue())