Represents cells data handler for reading large spreadsheet files in light weight mode.
When reading a workbook by this mode, startSheet(com.aspose.cells.Worksheet) will be checked when reading every worksheet in the workbook.
For one sheet, if startSheet(com.aspose.cells.Worksheet) gives true, then all data and properties of rows/cells of this sheet will be checked
and processed by the implementation of this interface. For every row, startRow(int) will be called to check whether it need to be processed.
If a row needs to be processed, properties of this row will be read firstly and user can access its properties by processRow(com.aspose.cells.Row).
if row's cells need to be processed too, then processRow(com.aspose.cells.Row) should returns true and then startCell(int) will be
called for every existing cell in this row to check whether one cell need to be processed. If one cell needs to be processed,
then processCell(com.aspose.cells.Cell) will be called to process the cell by the implementation of this interface.
Starts to process one row.
It will be called after row's properties such as height, style, ...etc. have been read. However, cells in this row has not been read yet.
Parameters:
row -
Row object which is being processed currently.
Returns:
whether this row's cells need to be processed. false to ignore all cells in this row.
startCell
public abstract boolean startCell(int columnIndex)
Prepares to process a cell.
It will be called when reaching an existing cell in current row. Current row is the row of last call of processRow(com.aspose.cells.Row).
Parameters:
columnIndex - column index of the cell to be processed
Returns:
whether this cell needs to be processed. false to ignore the cell and check the next one until reach the end of cells data of current row
Starts to process one cell.
It will be called after one cell's data has been read.
Parameters:
cell -
Cell object which is being processed currently
Returns:
whether this cell needs to be kept in cells model of current sheet.
Commonly it should be false so that all cells will not be kept in memory after being processed and then memory be saved.
For some special purpose such as user needs to access some cells later after the whole workbook having been processed,
user can make this method return true to keep those special cells in Cells model and access them later by APIs such as Cells[row, column].
However, keeping cells data in Cells model will requires more memory and if all cells are kept then reading template file
in LightCells mode will become same with reading it in normal way.