|
Generic Excel File (XLSX) Reader | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.myjeeva.poi.ExcelReader
public class ExcelReader
Constructor Summary | |
---|---|
ExcelReader(File file,
XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler,
ExcelSheetCallback sheetCallback)
Constructor: Microsoft Excel File (XSLX) Reader |
|
ExcelReader(OPCPackage pkg,
XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler,
ExcelSheetCallback sheetCallback)
Constructor: Microsoft Excel File (XSLX) Reader |
|
ExcelReader(String filePath,
XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler,
ExcelSheetCallback sheetCallback)
Constructor: Microsoft Excel File (XSLX) Reader |
Method Summary | |
---|---|
void |
process()
Processing all the WorkSheet from XLSX Workbook. |
void |
process(int sheetNumber)
Processing of particular WorkSheet (zero based) from XLSX Workbook. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExcelReader(OPCPackage pkg, XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler, ExcelSheetCallback sheetCallback)
pkg
- a OPCPackage
object - The package to process XLSXsheetContentsHandler
- a XSSFSheetXMLHandler.SheetContentsHandler
object - WorkSheet contents
handlersheetCallback
- a ExcelSheetCallback
object - WorkSheet callback for
sheet processing begin and end (can be null)public ExcelReader(String filePath, XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler, ExcelSheetCallback sheetCallback) throws Exception
filePath
- a String
object - The path of XLSX filesheetContentsHandler
- a XSSFSheetXMLHandler.SheetContentsHandler
object - WorkSheet contents
handlersheetCallback
- a ExcelSheetCallback
object - WorkSheet callback for
sheet processing begin and end (can be null)
Exception
public ExcelReader(File file, XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler, ExcelSheetCallback sheetCallback) throws Exception
file
- a File
object - The File object of XLSX filesheetContentsHandler
- a XSSFSheetXMLHandler.SheetContentsHandler
object - WorkSheet contents
handlersheetCallback
- a ExcelSheetCallback
object - WorkSheet callback for
sheet processing begin and end (can be null)
Exception
Method Detail |
---|
public void process() throws Exception
ExcelReader excelReader = new ExcelReader("src/main/resources/Sample-Person-Data.xlsx", workSheetHandler, sheetCallback);
excelReader.process();
ExcelReader excelReader = new ExcelReader(file, workSheetHandler, sheetCallback);
excelReader.process();
ExcelReader excelReader = new ExcelReader(pkg, workSheetHandler, sheetCallback);
excelReader.process();
Exception
public void process(int sheetNumber) throws Exception
ExcelReader excelReader = new ExcelReader("src/main/resources/Sample-Person-Data.xlsx", workSheetHandler, sheetCallback);
excelReader.process(2);
ExcelReader excelReader = new ExcelReader(file, workSheetHandler, sheetCallback);
excelReader.process(2);
ExcelReader excelReader = new ExcelReader(pkg, workSheetHandler, sheetCallback);
excelReader.process(2);
sheetNumber
- a int object
Exception
|
Generic Excel File (XLSX) Reader | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |