public class Excel03SaxReader extends Object implements org.apache.poi.hssf.eventusermodel.HSSFListener, ExcelSaxReader<Excel03SaxReader>
RID_PREFIX, SHEET_NAME_PREFIX
Constructor and Description |
---|
Excel03SaxReader(RowHandler rowHandler)
构造
|
Modifier and Type | Method and Description |
---|---|
int |
getSheetIndex()
获得Sheet序号,如果处理所有sheet,获得最大的Sheet序号,从0开始
|
String |
getSheetName()
获得Sheet名,如果处理所有sheet,获得后一个Sheet名,从0开始
|
void |
processRecord(org.apache.poi.hssf.record.Record record)
HSSFListener 监听方法,处理 Record
|
Excel03SaxReader |
read(File file,
String idOrRidOrSheetName)
开始读取Excel
|
Excel03SaxReader |
read(InputStream excelStream,
String idOrRidOrSheetName)
开始读取Excel,读取结束后并不关闭流
|
Excel03SaxReader |
read(org.apache.poi.poifs.filesystem.POIFSFileSystem fs,
String idOrRidOrSheetName)
读取
|
public Excel03SaxReader(RowHandler rowHandler)
rowHandler
- 行处理器public Excel03SaxReader read(File file, String idOrRidOrSheetName) throws POIException
ExcelSaxReader
read
in interface ExcelSaxReader<Excel03SaxReader>
file
- Excel文件idOrRidOrSheetName
- Excel中的sheet id或者rid编号或sheet名称,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheetPOIException
- POI异常public Excel03SaxReader read(InputStream excelStream, String idOrRidOrSheetName) throws POIException
ExcelSaxReader
read
in interface ExcelSaxReader<Excel03SaxReader>
excelStream
- Excel流idOrRidOrSheetName
- Excel中的sheet id或者rid编号,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheetPOIException
- POI异常public Excel03SaxReader read(org.apache.poi.poifs.filesystem.POIFSFileSystem fs, String idOrRidOrSheetName) throws POIException
fs
- POIFSFileSystem
idOrRidOrSheetName
- sheet id或者rid编号或sheet名称,从0开始,rid必须加rId前缀,例如rId0,如果为-1处理所有编号的sheetPOIException
- IO异常包装public int getSheetIndex()
public String getSheetName()
public void processRecord(org.apache.poi.hssf.record.Record record)
processRecord
in interface org.apache.poi.hssf.eventusermodel.HSSFListener
record
- 记录Copyright © 2024. All rights reserved.