![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CellHandler
Handler for processing cell values in Excel file cell by cell in Event driven mode.
When the LightCells
encounter one sheet, such as in LightCells.processWorkbook(CellHandler)
,
or when user call LightCells.processWorksheet(int, CellHandler)
or LightCells.processWorksheet(String, CellHandler)
,
LightCells
will call startSheet(int)
first to check whether this sheet should be precessed.
If true returned, then will check and process all cells in this sheet; if false returned, will ignore this sheet and move to next one.
When encounter one cell, LightCells
will call startCell(int, int)
first
to check whether this cell needs to be processed.
If true returned, then will parse the cell's value and call process(LightCell)
;
if false returned, will ignore this cell and move to next cell.
Method Summary | |
---|---|
void |
process(LightCell cell)
process current cell. Note: In consideration of performance, the LightCell object and the object field of it maybe reused for all cells, if it is needed to use current cell's data later out of current processing scope, the implementation should create one copy of current cell's data by LightCell.copy()
and keep the cloned one for later using. |
boolean |
startCell(int row,
int column)
start with a cell, check whether process it. |
boolean |
startSheet(int sheetIndex)
start with a worksheet, check whether process it. |
Method Detail |
---|
boolean startSheet(int sheetIndex)
sheetIndex
later in startCell() or process() method,
that is, if the process need to know which worksheet is being processed,
the implementation should retain the sheetIndex
value here.
sheetIndex
- index of current sheet.
boolean startCell(int row, int column)
row
- row index of current cell, base 0column
- column index of current cell, base 0
process(LightCell)
on this cell.
false will ignore this cell and move to next one.void process(LightCell cell)
LightCell.copy()
and keep the cloned one for later using.
cell
- data of current cell.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |