Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class LightCells

java.lang.Object
  extended by com.aspose.cells.LightCells

public abstract class LightCells
extends java.lang.Object

Cells processor for processing spreadsheet files in Event-Driven mode.


Method Summary
static LightCells getInstance(java.io.InputStream stream)
          Get one LightCells to process given Excel data stream, using default settings.
static LightCells getInstance(java.io.InputStream stream, int fileFormatType)
          Get one LightCells to process given Excel data stream, using default settings.
static LightCells getInstance(java.io.InputStream stream, int fileFormatType, int settingFlags)
          Deprecated. replaced by getInstance(InputStream, int, LightCellsSettings)
static LightCells getInstance(java.io.InputStream stream, int fileFormatType, LightCellsSettings settings)
          Get one LightCells to process given Excel data stream, using given settings.
static LightCells getInstance(java.io.InputStream stream, LightCellsSettings settings)
          Get one LightCells to process given Excel data stream, using default settings.
static LightCells getInstance(java.lang.String file)
          Get one LightCells to process given template file, using default settings.
static LightCells getInstance(java.lang.String file, int fileFormatType)
          Get one LightCells to process given template file, using default settings.
static LightCells getInstance(java.lang.String file, int fileFormatType, int settingFlags)
          Deprecated. replaced by getInstance(String, int, LightCellsSettings)
static LightCells getInstance(java.lang.String file, int fileFormatType, LightCellsSettings settings)
          Get one LightCells to process given template file, using given settings.
static LightCells getInstance(java.lang.String file, LightCellsSettings settings)
          Get one LightCells to process given template file, using default settings.
abstract  LightCellsSettings getSettings()
          get settings to check or modify advanced cell-process features.
 int getSheetCount()
          get total count of sheet in a workbook
 java.lang.String getSheetName(int sheetIndex)
          get name of sheet at given index
 void processWorkbook(CellHandler cellHandler)
          process whole workbook, in order sheet by sheet, row by row and then cell by cell
abstract  void processWorksheet(int sheetIndex, CellHandler cellHandler)
          process one worksheet.
 void processWorksheet(java.lang.String sheetName, CellHandler cellHandler)
          process one worksheet.
 void release()
          release resource(such as file handler, opened InputStream, and so on) hold by this handler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LightCells getInstance(java.lang.String file)
                              throws java.io.IOException
Get one LightCells to process given template file, using default settings.

Parameters:
file - template file to process
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.lang.String file,
                                     LightCellsSettings settings)
                              throws java.io.IOException
Get one LightCells to process given template file, using default settings.

Parameters:
file - template file to process
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.io.InputStream stream)
                              throws java.io.IOException
Get one LightCells to process given Excel data stream, using default settings.

Parameters:
stream - data stream to get Excel data from
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.io.InputStream stream,
                                     LightCellsSettings settings)
                              throws java.io.IOException
Get one LightCells to process given Excel data stream, using default settings.

Parameters:
stream - data stream to get Excel data from
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.lang.String file,
                                     int fileFormatType)
                              throws java.io.IOException
Get one LightCells to process given template file, using default settings.

Parameters:
file - template file to process
fileFormatType - file format type of given template. see FileFormatType
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.lang.String file,
                                     int fileFormatType,
                                     int settingFlags)
                              throws java.io.IOException
Deprecated. replaced by getInstance(String, int, LightCellsSettings)

Get one LightCells to process given template file, using given settings.

Parameters:
file - template file to process
fileFormatType - file format type of given template. see FileFormatType
settingFlags - settings flags for initializing LightCells, such as whether load data for fetching cell's formula text. For available flags please refer to constants with header INIT_ defined in LightCellsSettings. The flag may be combined with any of other flags using the OR operator.
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.lang.String file,
                                     int fileFormatType,
                                     LightCellsSettings settings)
                              throws java.io.IOException
Get one LightCells to process given template file, using given settings.

Parameters:
file - template file to process
fileFormatType - file format type of given template. see FileFormatType
settings - settings for initializing LightCells, such as whether load data for fetching cell's formula text.
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.io.InputStream stream,
                                     int fileFormatType)
                              throws java.io.IOException
Get one LightCells to process given Excel data stream, using default settings.

Parameters:
stream - data stream to get Excel data from
fileFormatType - file format type of given template. see FileFormatType
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.io.InputStream stream,
                                     int fileFormatType,
                                     int settingFlags)
                              throws java.io.IOException
Deprecated. replaced by getInstance(InputStream, int, LightCellsSettings)

Get one LightCells to process given Excel data stream, using given settings.

Parameters:
stream - data stream to get Excel data from
fileFormatType - file format type of given template. see FileFormatType
settingFlags - settings flags for initializing LightCells, such as whether load data for fetching cell's formula text. For available flags please refer to constants with header INIT_ defined in LightCellsSettings. The flag may be combined with any of other flags using the OR operator.
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getInstance

public static LightCells getInstance(java.io.InputStream stream,
                                     int fileFormatType,
                                     LightCellsSettings settings)
                              throws java.io.IOException
Get one LightCells to process given Excel data stream, using given settings.

Parameters:
stream - data stream to get Excel data from
fileFormatType - file format type of given template. see FileFormatType
settings - settings for initializing LightCells, such as whether load data for fetching cell's formula text.
Returns:
LightCells instance to process given file.
Throws:
java.io.IOException

getSheetCount

public int getSheetCount()
get total count of sheet in a workbook

Returns:
count of sheet in a workbook

getSheetName

public java.lang.String getSheetName(int sheetIndex)
get name of sheet at given index

Parameters:
sheetIndex - index of sheet
Returns:
sheet's name.
Throws:
java.lang.IllegalArgumentException - when no sheet at given index

processWorkbook

public void processWorkbook(CellHandler cellHandler)
                     throws java.lang.Exception
process whole workbook, in order sheet by sheet, row by row and then cell by cell

Parameters:
cellHandler - handler to process cell
Throws:
java.lang.Exception

processWorksheet

public void processWorksheet(java.lang.String sheetName,
                             CellHandler cellHandler)
                      throws java.lang.Exception
process one worksheet.

Parameters:
sheetName - the name of the worksheet to be processed.
cellHandler - handler to process cell
Throws:
java.lang.Exception

release

public void release()
             throws java.lang.Exception
release resource(such as file handler, opened InputStream, and so on) hold by this handler. After released, this handler can not be used for processing cells anymore.

Throws:
java.lang.Exception

processWorksheet

public abstract void processWorksheet(int sheetIndex,
                                      CellHandler cellHandler)
                               throws java.lang.Exception
process one worksheet.

Parameters:
sheetIndex - the index of worksheet to be processed. base 0.
cellHandler - handler to process cell
Throws:
java.lang.Exception

getSettings

public abstract LightCellsSettings getSettings()
get settings to check or modify advanced cell-process features.

Returns:
settings of this LightCells