Top Methods
org.apache.poi.sl.usermodel

public Interface TableShape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

extends Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>, PlaceableShape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

Method Summary

Modifier and TypeMethod and Description
public TableCell<S, P>

Returns:

the cell or null if the cell doesn't exists, e.g. when accessing a merged cell or if the index is out of bounds
getCell
(int
the row index (0-based)
row
,
int
the column index (0-based)
col
)

Gets a cell

public double

Returns:

the width (in points)
getColumnWidth
(int
the column index (0-based)
idx
)

Gets the width (in points) of the n-th column

public int

Returns:

the maximum number of column
getNumberOfColumns
()

Return the maximum number of columns.

public int

Returns:

the row count
getNumberOfRows
()

Return the number of rows

public double

Returns:

the height (in points)
getRowHeight
(int
the row index (0-based)
row
)

Gets the row height

public void
setColumnWidth(int
the column index (0-based)
idx
,
double
the width (in points)
width
)

Sets the width (in points) of the n-th column

public void
setRowHeight(int
the row index (0-based)
row
,
double
the height to set (in points)
height
)

Sets the row height.

Inherited from org.apache.poi.sl.usermodel.PlaceableShape:
getAnchorgetFlipHorizontalgetFlipVerticalgetParentgetRotationgetSheetsetAnchorsetFlipHorizontalsetFlipVerticalsetRotation
Inherited from org.apache.poi.sl.usermodel.Shape:
drawgetAnchorgetParentgetShapeIdgetShapeNamegetSheet

Method Detail

getCellback to summary
public TableCell<S, P> getCell(int row, int col)

Gets a cell

Parameters
row:int

the row index (0-based)

col:int

the column index (0-based)

Returns:TableCell<S, P>

the cell or null if the cell doesn't exists, e.g. when accessing a merged cell or if the index is out of bounds

getColumnWidthback to summary
public double getColumnWidth(int idx)

Gets the width (in points) of the n-th column

Parameters
idx:int

the column index (0-based)

Returns:double

the width (in points)

getNumberOfColumnsback to summary
public int getNumberOfColumns()

Return the maximum number of columns. If the table contains merged cells, the number of columns might be less than the maximum.

Returns:int

the maximum number of column

getNumberOfRowsback to summary
public int getNumberOfRows()

Return the number of rows

Returns:int

the row count

getRowHeightback to summary
public double getRowHeight(int row)

Gets the row height

Parameters
row:int

the row index (0-based)

Returns:double

the height (in points)

setColumnWidthback to summary
public void setColumnWidth(int idx, double width)

Sets the width (in points) of the n-th column

Parameters
idx:int

the column index (0-based)

width:double

the width (in points)

setRowHeightback to summary
public void setRowHeight(int row, double height)

Sets the row height.

Parameters
row:int

the row index (0-based)

height:double

the height to set (in points)