Skip to main content

Метод Cell.isContentEmpty

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

Вызов​


bool isContentEmpty()

Возвращает​

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

Пример​


sheet = document.getBlocks().getTable(0)
cell1 = sheet.getCell("A1")
cell2 = sheet.getCell("A2")
cell3 = sheet.getCell("A3")
cell1.setText("123")
props = myOfficeSDK.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