public class Excel2007Reader extends org.xml.sax.helpers.DefaultHandler
| 构造器和说明 |
|---|
Excel2007Reader() |
Excel2007Reader(IRowReader rowReader) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String localName,
String name) |
XMLReader |
fetchSheetParser(org.apache.poi.xssf.model.SharedStringsTable sst) |
void |
process(InputStream stream)
遍历工作簿中所有的电子表格
|
void |
process(String filename)
遍历工作簿中所有的电子表格
|
void |
processOneSheet(String filename,
int sheetId)
只遍历一个电子表格,其中sheetId为要遍历的sheet索引,从1开始,1-3
|
void |
setRowReader(IRowReader rowReader) |
void |
startElement(String uri,
String localName,
String name,
Attributes attributes) |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warningpublic Excel2007Reader()
public Excel2007Reader(IRowReader rowReader)
public void setRowReader(IRowReader rowReader)
public void processOneSheet(String filename, int sheetId) throws Exception
filename - sheetId - Exceptionpublic void process(String filename) throws Exception
filename - stringException - if an error occurredpublic void process(InputStream stream) throws Exception
stream - Exception - if an error occurredpublic XMLReader fetchSheetParser(org.apache.poi.xssf.model.SharedStringsTable sst) throws SAXException
SAXExceptionpublic void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
SAXExceptionpublic void endElement(String uri, String localName, String name) throws SAXException
endElement 在接口中 ContentHandlerendElement 在类中 org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters 在接口中 ContentHandlercharacters 在类中 org.xml.sax.helpers.DefaultHandlerSAXExceptionCopyright © 2017. All rights reserved.