Top Description Fields Constructors Methods
org.apache.poi.ss.usermodel

public sealed Enum TableStyleType

extends Enum<TableStyleType>
Class Inheritance
Imports
org.apache.poi.ss.util.CellRangeAddress, .CellRangeAddressBase, .CellReference

Ordered list of table style elements, for both data tables and pivot tables. Some elements only apply to pivot tables, but any style definition can omit any number, so having them in one list should not be a problem.

The order is the specification order of application, with later elements overriding previous ones, if style properties conflict.

Processing could iterate bottom-up if looking for specific properties, and stop when the first style is found defining a value for that property.

Enum names match the OOXML spec values exactly, so valueOf(String) will work.

Since
3.17 beta 1

Field Summary

Modifier and TypeField and Description
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType
public static final TableStyleType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CellRangeAddressBase

Returns:

range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.
appliesTo
(Table
table to evaluate
table
,
Cell
to evaluate
cell
)

A range is returned only for the part of the table matching this enum instance and containing the given cell.

public CellRangeAddressBase

Returns:

range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.
appliesTo
(Table
table to evaluate
table
,
CellReference
CellReference to evaluate
cell
)

A range is returned only for the part of the table matching this enum instance and containing the given cell reference.

public final CellRangeAddressBase

Returns:

default is unimplemented/null
getRange
(Table table, Cell cell)

Calls getRange(Table, CellReference).

public CellRangeAddressBase

Returns:

default is unimplemented/null
getRange
(Table table, CellReference cell)

public static TableStyleType
public static TableStyleType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

blankRowback to summary
public static final TableStyleType blankRow
firstColumnback to summary
public static final TableStyleType firstColumn
firstColumnStripeback to summary
public static final TableStyleType firstColumnStripe
firstColumnSubheadingback to summary
public static final TableStyleType firstColumnSubheading
firstHeaderCellback to summary
public static final TableStyleType firstHeaderCell
firstRowStripeback to summary
public static final TableStyleType firstRowStripe
firstRowSubheadingback to summary
public static final TableStyleType firstRowSubheading
firstSubtotalColumnback to summary
public static final TableStyleType firstSubtotalColumn
firstSubtotalRowback to summary
public static final TableStyleType firstSubtotalRow
firstTotalCellback to summary
public static final TableStyleType firstTotalCell
headerRowback to summary
public static final TableStyleType headerRow
lastColumnback to summary
public static final TableStyleType lastColumn
lastHeaderCellback to summary
public static final TableStyleType lastHeaderCell
lastTotalCellback to summary
public static final TableStyleType lastTotalCell
pageFieldLabelsback to summary
public static final TableStyleType pageFieldLabels
pageFieldValuesback to summary
public static final TableStyleType pageFieldValues
secondColumnStripeback to summary
public static final TableStyleType secondColumnStripe
secondColumnSubheadingback to summary
public static final TableStyleType secondColumnSubheading
secondRowStripeback to summary
public static final TableStyleType secondRowStripe
secondRowSubheadingback to summary
public static final TableStyleType secondRowSubheading
secondSubtotalColumnback to summary
public static final TableStyleType secondSubtotalColumn
secondSubtotalRowback to summary
public static final TableStyleType secondSubtotalRow
thirdColumnSubheadingback to summary
public static final TableStyleType thirdColumnSubheading
thirdRowSubheadingback to summary
public static final TableStyleType thirdRowSubheading
thirdSubtotalColumnback to summary
public static final TableStyleType thirdSubtotalColumn
thirdSubtotalRowback to summary
public static final TableStyleType thirdSubtotalRow
totalRowback to summary
public static final TableStyleType totalRow
wholeTableback to summary
public static final TableStyleType wholeTable

Constructor Detail

TableStyleTypeback to summary
private TableStyleType()

Method Detail

appliesToback to summary
public CellRangeAddressBase appliesTo(Table table, Cell cell)

A range is returned only for the part of the table matching this enum instance and containing the given cell. Null is returned for all other cases, such as:

  • Cell on a different sheet than the table
  • Cell outside the table
  • this Enum part is not included in the table (i.e. no header/totals row)
  • this Enum is for a table part not yet implemented in POI, such as pivot table elements
The returned range can be used to determine how style options may or may not apply to this cell. For example, wholeTable borders only apply to the outer boundary of a table, while the rest of the styling, such as font and color, could apply to all the interior cells as well.
Parameters
table:Table

table to evaluate

cell:Cell

to evaluate

Returns:CellRangeAddressBase

range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.

appliesToback to summary
public CellRangeAddressBase appliesTo(Table table, CellReference cell)

A range is returned only for the part of the table matching this enum instance and containing the given cell reference. Null is returned for all other cases, such as:

  • Cell on a different sheet than the table
  • Cell outside the table
  • this Enum part is not included in the table (i.e. no header/totals row)
  • this Enum is for a table part not yet implemented in POI, such as pivot table elements
The returned range can be used to determine how style options may or may not apply to this cell. For example, wholeTable borders only apply to the outer boundary of a table, while the rest of the styling, such as font and color, could apply to all the interior cells as well.
Parameters
table:Table

table to evaluate

cell:CellReference

CellReference to evaluate

Returns:CellRangeAddressBase

range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.

getRangeback to summary
public final CellRangeAddressBase getRange(Table table, Cell cell)

Calls getRange(Table, CellReference). Use that instead for performance.

Returns:CellRangeAddressBase

default is unimplemented/null

See Also
getRange(Table, CellReference)
getRangeback to summary
public CellRangeAddressBase getRange(Table table, CellReference cell)
Returns:CellRangeAddressBase

default is unimplemented/null

valueOfback to summary
public static TableStyleType valueOf(String name)
valuesback to summary
public static TableStyleType[] values()