public class TableHelper extends Object
| Constructor and Description |
|---|
TableHelper(PositionUtil positionUtil)
Create the table helper.
|
| Modifier and Type | Method and Description |
|---|---|
static TableHelper |
create() |
TableCellWalker |
getCell(Table table,
int rowIndex,
int colIndex) |
TableCellWalker |
getCell(Table table,
String address) |
void |
setCellMerge(Table table,
int rowIndex,
int colIndex,
int rowMerge,
int columnMerge)
Deprecated.
use table.setCellMerge.
|
void |
setCellMerge(Table table,
String address,
int rowMerge,
int columnMerge)
Set the merging of multiple cells to one cell in all existing tables.
|
void |
setCellValue(Table table,
int rowIndex,
int colIndex,
CellValue value) |
void |
setCellValue(Table table,
int rowIndex,
int colIndex,
CellValue value,
TableCellStyle ts) |
void |
setCellValue(Table table,
String address,
CellValue value)
Sets the cell value in all tables to the given values.
|
void |
setCellValue(Table table,
String address,
CellValue value,
TableCellStyle ts)
Sets the cell value in all tables to the given values.
|
public TableHelper(PositionUtil positionUtil)
positionUtil - an utilpublic static TableHelper create()
@Deprecated public void setCellMerge(Table table, int rowIndex, int colIndex, int rowMerge, int columnMerge) throws IOException
table - the table where the cells to merge arerowIndex - The row, 0 is the first rowcolIndex - The column, 0 is the first columnrowMerge - the number of rows to mergecolumnMerge - the number of columns to mergeIOException - if the cells can't be mergedpublic void setCellMerge(Table table, String address, int rowMerge, int columnMerge) throws IOException, ParseException
table - the table where the cells to merge areaddress - The cell position e.g. 'A1'rowMerge - the number of rows to mergecolumnMerge - the number of cells to mergeIOException - if the cells can't be mergedParseException - if the address can't be parsedpublic void setCellValue(Table table, int rowIndex, int colIndex, CellValue value, TableCellStyle ts) throws IOException
table - the table where the cells to merge arerowIndex - The row, 0 is the first rowcolIndex - The column, 0 is the first columnvalue - the value to setts - the cell styleIOException - if the cell value can't be setpublic void setCellValue(Table table, int rowIndex, int colIndex, CellValue value) throws IOException
table - the table where the cells to merge arerowIndex - The row, 0 is the first rowcolIndex - The column, 0 is the first columnvalue - the value to setIOException - if the cell value can't be setpublic void setCellValue(Table table, String address, CellValue value, TableCellStyle ts) throws IOException, ParseException
address - The cell position e.g. 'A1'table - The table where the value is setvalue - The value to set the cell tots - The table style for this cellIOException - if the cell value can't be setParseException - if the address can't be parsedpublic void setCellValue(Table table, String address, CellValue value) throws IOException, ParseException
address - The cell position e.g. 'A1'table - The table where the value is setvalue - The value to set the cell toIOException - if the cell value can't be setParseException - if the address can't be parsedpublic TableCellWalker getCell(Table table, int rowIndex, int colIndex) throws IOException
table - the table where the cells to merge arerowIndex - The row, 0 is the first rowcolIndex - The column, 0 is the first columnIOException - if the row was flushedpublic TableCellWalker getCell(Table table, String address) throws IOException, ParseException
table - the table where the cells to merge areaddress - the addressIOException - if the row was flushedParseException - if the address can't be parsedCopyright © 2016–2021. All rights reserved.