public class ExcelReader
extends java.lang.Object
Constructor and Description |
---|
ExcelReader(java.io.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(java.lang.String filePath,
XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler,
ExcelSheetCallback sheetCallback)
Constructor: Microsoft Excel File (XSLX) Reader
|
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(java.lang.String filePath, XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler, ExcelSheetCallback sheetCallback) throws java.lang.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)java.lang.Exception
public ExcelReader(java.io.File file, XSSFSheetXMLHandler.SheetContentsHandler sheetContentsHandler, ExcelSheetCallback sheetCallback) throws java.lang.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)java.lang.Exception
public void process() throws java.lang.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();
java.lang.Exception
public void process(int sheetNumber) throws java.lang.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 objectjava.lang.Exception
The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons Attribution-Share Alike 3.0 Unported License. Libraries and code snippets on myjeeva.com has license information.