Таблица DocumentAPI.ScientificCellFormatting
Таблица содержит параметры для экспоненциального формата ячеек таблицы. Данная таблица используется в качестве аргумента метода Cell:setFormat().
| Поле | Тип | Описание |
|---|---|---|
ScientificCellFormatting.decimalPlaces | number | Количество десятичных позиций |
ScientificCellFormatting.minExponentDigits | number | Минимальное количество позиций экспоненты |
Пример
local table = document:getBlocks():getTable(0)
local cell = table:getCell("B2")
local scientificCellFormatting = DocumentAPI.ScientificCellFormatting()
scientificCellFormatting.decimalPlaces = 2
scientificCellFormatting.minExponentDigits = 3
cell:setFormat(scientificCellFormatting)
print(cell:getFormattedValue())