Table class reference

  • const wchar_t* name() const
    Returns the name of the table.
  • void setName(const wchar_t* name)
    Sets the name of the table.
  • const wchar_t* ref() const
    Returns the range on the sheet for this table.
  • void setRef(const wchar_t* ref)
    Sets the range on the sheet for this table.
  • AutoFilter* autoFilter()
    Returns the AutoFilter of the table.
  • TableStyle style() const
    Returns the table style.
  • void setStyle(TableStyle tableStyle)
    Sets the table style.
    TableStyle valueViewTableStyle valueView
    TABLESTYLE_NONETABLESTYLE_NONETABLESTYLE_MEDIUM10TABLESTYLE_MEDIUM10
    TABLESTYLE_LIGHT1TABLESTYLE_LIGHT1TABLESTYLE_MEDIUM11TABLESTYLE_MEDIUM11
    TABLESTYLE_LIGHT2TABLESTYLE_LIGHT2TABLESTYLE_MEDIUM12TABLESTYLE_MEDIUM12
    TABLESTYLE_LIGHT3TABLESTYLE_LIGHT3TABLESTYLE_MEDIUM13TABLESTYLE_MEDIUM13
    TABLESTYLE_LIGHT4TABLESTYLE_LIGHT4TABLESTYLE_MEDIUM14TABLESTYLE_MEDIUM14
    TABLESTYLE_LIGHT5TABLESTYLE_LIGHT5TABLESTYLE_MEDIUM15TABLESTYLE_MEDIUM15
    TABLESTYLE_LIGHT6TABLESTYLE_LIGHT6TABLESTYLE_MEDIUM16TABLESTYLE_MEDIUM16
    TABLESTYLE_LIGHT7TABLESTYLE_LIGHT7TABLESTYLE_MEDIUM17TABLESTYLE_MEDIUM17
    TABLESTYLE_LIGHT8TABLESTYLE_LIGHT8TABLESTYLE_MEDIUM18TABLESTYLE_MEDIUM18
    TABLESTYLE_LIGHT9TABLESTYLE_LIGHT9TABLESTYLE_MEDIUM19TABLESTYLE_MEDIUM19
    TABLESTYLE_LIGHT10TABLESTYLE_LIGHT10TABLESTYLE_MEDIUM20TABLESTYLE_MEDIUM20
    TABLESTYLE_LIGHT11TABLESTYLE_LIGHT11TABLESTYLE_MEDIUM21TABLESTYLE_MEDIUM21
    TABLESTYLE_LIGHT12TABLESTYLE_LIGHT12TABLESTYLE_MEDIUM22TABLESTYLE_MEDIUM22
    TABLESTYLE_LIGHT13TABLESTYLE_LIGHT13TABLESTYLE_MEDIUM23TABLESTYLE_MEDIUM23
    TABLESTYLE_LIGHT14TABLESTYLE_LIGHT14TABLESTYLE_MEDIUM24TABLESTYLE_MEDIUM24
    TABLESTYLE_LIGHT15TABLESTYLE_LIGHT15TABLESTYLE_MEDIUM25TABLESTYLE_MEDIUM25
    TABLESTYLE_LIGHT16TABLESTYLE_LIGHT16TABLESTYLE_MEDIUM26TABLESTYLE_MEDIUM26
    TABLESTYLE_LIGHT17TABLESTYLE_LIGHT17TABLESTYLE_MEDIUM27TABLESTYLE_MEDIUM27
    TABLESTYLE_LIGHT18TABLESTYLE_LIGHT18TABLESTYLE_MEDIUM28TABLESTYLE_MEDIUM28
    TABLESTYLE_LIGHT19TABLESTYLE_LIGHT19TABLESTYLE_DARK1TABLESTYLE_DARK1
    TABLESTYLE_LIGHT20TABLESTYLE_LIGHT20TABLESTYLE_DARK2TABLESTYLE_DARK2
    TABLESTYLE_LIGHT21TABLESTYLE_LIGHT21TABLESTYLE_DARK3TABLESTYLE_DARK3
    TABLESTYLE_MEDIUM1TABLESTYLE_MEDIUM1TABLESTYLE_DARK4TABLESTYLE_DARK4
    TABLESTYLE_MEDIUM2TABLESTYLE_MEDIUM2TABLESTYLE_DARK5TABLESTYLE_DARK5
    TABLESTYLE_MEDIUM3TABLESTYLE_MEDIUM3TABLESTYLE_DARK6TABLESTYLE_DARK6
    TABLESTYLE_MEDIUM4TABLESTYLE_MEDIUM4TABLESTYLE_DARK7TABLESTYLE_DARK7
    TABLESTYLE_MEDIUM5TABLESTYLE_MEDIUM5TABLESTYLE_DARK8TABLESTYLE_DARK8
    TABLESTYLE_MEDIUM6TABLESTYLE_MEDIUM6TABLESTYLE_DARK9TABLESTYLE_DARK9
    TABLESTYLE_MEDIUM7TABLESTYLE_MEDIUM7TABLESTYLE_DARK10TABLESTYLE_DARK10
    TABLESTYLE_MEDIUM8TABLESTYLE_MEDIUM8TABLESTYLE_DARK11TABLESTYLE_DARK11
    TABLESTYLE_MEDIUM9TABLESTYLE_MEDIUM9
  • bool showRowStripes() const
    Returns whether row stripe formatting is applied.
  • void setShowRowStripes(bool showRowStripes = true)
    Turns on/off row stripe formatting.
  • bool showColumnStripes() const
    Returns whether column stripe formatting is applied.
  • void setShowColumnStripes(bool showColumnStripes = true)
    Turns on/off column stripe formatting.
  • bool showFirstColumn() const
    Returns whether the first column in the table should have the style applied.
  • void setShowFirstColumn(bool showFirstColumn = true)
    Sets whether the first column in the table should have the style applied.
  • bool showLastColumn() const
    Returns whether the last column in the table should have the style applied.
  • void setShowLastColumn(bool showLastColumn = true)
    Sets whether the last column in the table should have the style applied.
  • int columnSize() const
    Returns the number of columns in the table.
  • const wchar_t* columnName(int columnIndex) const
    Returns the unique name of the table column with the specified index.
  • bool setColumnName(int columnIndex, const wchar_t* name)
    Sets the unique name of the table column with the specified index. Please note that if you write the name of the column with the Sheet::writeStr(), the workbook will be corrupted, because the Sheet::writeStr() doesn't check if the specified cell belongs to a table.