Skip to main content

Метод Cell::isContentEmpty

Метод позволяет определить содержит ли ячейка данные.

Вызов​


bool isContentEmpty()

Возвращает​

  • true, если ячейка не содержит данные, в ином случае – false.

Пример​


Table sheet = document.getBlocks().getTable(0).get();
Cell cell1 = sheet.getCell("A1");
Cell cell2 = sheet.getCell("A2");
Cell cell3 = sheet.getCell("A3");
cell1.setText("123");
TextProperties props = TextProperties();
props.bold = true;
cell2.setTextProperties(props);

cell1.isEmpty(); // false
cell1.isContentEmpty(); // false

cell2.isEmpty(); // false
cell2.isContentEmpty(); // true

cell3.isEmpty(); // true
cell3.isContentEmpty(); // true