E
- data object this extractor applies topublic class FlatFileExtractor<E extends DataObject<E>>
extends java.lang.Object
Constructor and Description |
---|
FlatFileExtractor(DataObjectDefinition<E> definition)
Creates a flat file extractor for the object
|
Modifier and Type | Method and Description |
---|---|
static org.apache.poi.ss.usermodel.CellStyle |
createBorderedStyle(org.apache.poi.ss.usermodel.Workbook wb)
a utility class to create style for a border around a cell
|
static org.apache.poi.ss.usermodel.CellStyle |
createDateStyle(org.apache.poi.ss.usermodel.Workbook wb,
java.lang.String simpledateformat)
creates a style to show dates in the provided format
|
SFile |
extractToExcel(E[] objectarray)
extracts an array of objects to excel
|
SFile |
extractToExcel(E[] objectarray,
java.lang.String[] specificaliaslist) |
SFile |
extractToExcel(NodeTree<E> objecttree)
Extracts to excel a tree of objects
|
static int |
getCellNbChar(org.apache.poi.ss.usermodel.Cell cell)
provides the number of characters needed for a cell
|
static int |
maxNumberCharacter(java.lang.String multilinestring)
provides the maximum number of characters of any line in the text
|
static void |
setRestrictionsOnCell(org.apache.poi.ss.usermodel.Sheet mainsheet,
org.apache.poi.ss.usermodel.Sheet restrictionsheet,
int column,
int nbofchoices,
int nbofrows)
create restrictions on the data cells
|
public FlatFileExtractor(DataObjectDefinition<E> definition)
definition
- the parent objectpublic SFile extractToExcel(E[] objectarray, java.lang.String[] specificaliaslist)
objectarray
- specificaliaslist
- public SFile extractToExcel(NodeTree<E> objecttree)
objecttree
- object treespublic SFile extractToExcel(E[] objectarray)
objectarray
- the object arraypublic static int getCellNbChar(org.apache.poi.ss.usermodel.Cell cell)
cell
- the cell to analyzepublic static int maxNumberCharacter(java.lang.String multilinestring)
multilinestring
- a multi-line stringpublic static org.apache.poi.ss.usermodel.CellStyle createBorderedStyle(org.apache.poi.ss.usermodel.Workbook wb)
wb
- the workbookpublic static org.apache.poi.ss.usermodel.CellStyle createDateStyle(org.apache.poi.ss.usermodel.Workbook wb, java.lang.String simpledateformat)
wb
- workbooksimpledateformat
- format of the datepublic static void setRestrictionsOnCell(org.apache.poi.ss.usermodel.Sheet mainsheet, org.apache.poi.ss.usermodel.Sheet restrictionsheet, int column, int nbofchoices, int nbofrows)
mainsheet
- sheet with datarestrictionsheet
- sheet with restriction valuescolumn
- index of column (starting with zero)nbofchoices
- number of choices (starting with zero)nbofrows
- number of rows (starting with zero)