public class Excel07SaxReader extends AbstractExcelSaxReader<Excel07SaxReader> implements ContentHandler
| Constructor and Description |
|---|
Excel07SaxReader(RowHandler rowHandler)
构造
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length)
s标签结束的回调处理方法
|
void |
endDocument() |
void |
endElement(String uri,
String localName,
String qName)
标签结束的回调处理方法
|
void |
endPrefixMapping(String prefix) |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
processingInstruction(String target,
String data) |
Excel07SaxReader |
read(File file,
int rid)
开始读取Excel
|
Excel07SaxReader |
read(InputStream in,
int rid)
开始读取Excel,读取结束后并不关闭流
|
Excel07SaxReader |
read(org.apache.poi.openxml4j.opc.OPCPackage opcPackage,
int rid)
开始读取Excel,Sheet编号从0开始计数
|
void |
setDocumentLocator(Locator locator) |
Excel07SaxReader |
setRowHandler(RowHandler rowHandler)
设置行处理器
|
void |
skippedEntity(String name) |
void |
startDocument()
?xml标签的回调处理方法
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
读到一个xml开始标签时的回调处理方法
|
void |
startPrefixMapping(String prefix,
String uri) |
read, read, read, readpublic Excel07SaxReader(RowHandler rowHandler)
rowHandler - 行处理器public Excel07SaxReader setRowHandler(RowHandler rowHandler)
rowHandler - 行处理器public Excel07SaxReader read(File file, int rid) throws InstrumentException
ExcelSaxReaderread in interface ExcelSaxReader<Excel07SaxReader>file - Excel文件rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheetInstrumentException - POI异常public Excel07SaxReader read(InputStream in, int rid) throws InstrumentException
ExcelSaxReaderread in interface ExcelSaxReader<Excel07SaxReader>in - Excel流rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheetInstrumentException - POI异常public Excel07SaxReader read(org.apache.poi.openxml4j.opc.OPCPackage opcPackage, int rid) throws InstrumentException
opcPackage - OPCPackage,Excel包rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheetInstrumentException - POI异常public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionCopyright © 2019. All rights reserved.