Класс CellPosition
Класс CellPosition позволяет задать координаты ячейки листа табличного документа или таблицы в составе текстового документа. Также используется для описания полей topLeft, rightBottom класса CellRangePosition.
Конструкторы
public CellPosition()
public CellPosition(uint rowArg, uint columnArg)
rowArg– индекс строки ячейки (индексация начинается с нуля), типuint;columnArg– индекс колонки ячейки, типuint.
Примеры
Table table = document.getBlocks().getTable(0);
Cell cell = table.getCell(new CellPosition(2, 0));
Table table = document.getBlocks().getTable("List11");
Charts charts = table.getCharts();
ChartRangeInfo rangeInfo = charts.getChart(0).getRange(0);
TableRangeInfo cellRangePosition = rangeInfo.tableRangeInfo;
CellRangePosition tableRange = cellRangePosition.tableRange;
CellPosition topLeftCellPosition = tableRange.topLeft;
Console.WriteLine("top left row:", topLeftCellPosition.row, ", top left column:", topLeftCellPosition.column);