public interface LightCellsDataProvider
Remarks
When saving a workbook by this mode,startSheet(int) will be checked when saving every worksheet in the workbook.
For one sheet, if startSheet(int) gives true, then all data and properties to be saved for rows/cells of this sheet
will be provided by the implementation of this interface.
In the first place, nextRow() will be called to get the next row index to be saved.
If a valid row index is returned(the row index must be in ascending order for the rows to be saved),
then a Row object representing this row will be provided by startRow(Row) for the implementation to set its properties.
For one row, nextCell() will be checked firstly.
If a valid column index be returned(the column index must be in ascending order for all cells of current row),
then a Cell object representing this cell will be provided by startCell(Cell) for implementation to set its data and properties.
After startCell(Cell) the cell will be saved directly to the resultant spreadsheet file.
Then the next cell will be checked and processed.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isGatherString()
Checks whether the current string value of cell needs to be gathered into a global pool.
|
int |
nextCell()
Gets next cell to be saved.
|
int |
nextRow()
Gets the next row to be saved.
|
void |
startCell(Cell cell)
Starts to save data of one cell.
|
void |
startRow(Row row)
Starts to save data of one row.
|
boolean |
startSheet(int sheetIndex)
Starts to save a worksheet.
|
boolean startSheet(int sheetIndex)
Remarks
It will be called at the beginning of saving a worksheet during saving a workbook. If the provider needs to refer tosheetIndex later
in startRow(Row) or startCell(Cell) method,
that is, if the process needs to know which worksheet is being processed,
the implementation should retain the sheetIndex value here.sheetIndex - index of current sheet to be saved.int nextRow()
Remarks
It will be called at the beginning of saving a row and its cells data(beforestartRow(Row)).void startRow(Row row)
Remarks
It will be called at the beginning of saving a row and its cells data. If current row has some custom properties such as height, style, ...etc., implementation should set those properties to given Row object here.row - Row object for implementation to fill data. Its row index is the returned value of latest call of nextRow().
If the row has been initialized in the inner cells model, the existing row object will be used.
Otherwise a temporary Row object will be used for implementation to fill data.int nextCell()
Remarks
It will be called at the beginning of saving one cell.void startCell(Cell cell)
Remarks
cell - Cell object for implementation to fill data. Its column index is the returned value of latest call of nextCell().
If the cell has been initialized in the inner cells model, the existed cell object will be used.
Otherwise a temporary Cell object will be used for implementation to fill data.boolean isGatherString()
Remarks
Gathering string values will take advantage only when there are many duplicated string values for the cells provided by this implementation. In this situation gathering string will save much memory and generate smaller resultant file. If there are many string values for the cells provided by LightCellsDataProvider but few of them are same, gathering string will cost more memory and time and has no advantage for the resultant file.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.