public class Excel2007Reader extends DefaultHandler
Constructor and Description |
---|
Excel2007Reader() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
添加字符
|
void |
endElement(String uri,
String localName,
String name)
Receive notification of the end of an element.
|
short |
getFormatIndex()
取得formatIndex的值
|
String |
getFormatString()
取得formatString的值
|
org.apache.poi.ss.usermodel.DataFormatter |
getFormatter()
取得formatter的值
|
int |
getLastColumnNumber()
取得lastColumnNumber的值
|
int |
getMinColumnCount()
取得minColumnCount的值
|
XssfDataType |
getNextDataType()
取得nextDataType的值
|
List<String> |
getRowlist()
取得rowlist的值
|
org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable |
getSharedStringsTable()
取得sharedStringsTable的值
|
Map<Integer,List<String[]>> |
getSheetData()
获取数据(多Sheet)
|
List<String[]> |
getSheetData(Integer sheetIndex)
获取数据(单Sheet)
|
int |
getSheetIndex()
取得sheetIndex的值
|
org.apache.poi.xssf.model.StylesTable |
getStylesTable()
取得stylesTable的值
|
int |
getThisColumn()
取得thisColumn的值
|
StringBuffer |
getValue()
取得value的值
|
Map<Integer,List<String[]>> |
getWorkData()
取得workData的值
|
boolean |
isvIsOpen()
取得vIsOpen的值
|
void |
process(InputStream fileStream,
boolean isMuti)
解析多Sheet内容
异常处理暂时不完整
|
void |
setFormatIndex(short formatIndex)
设定formatIndex的值
|
void |
setFormatString(String formatString)
设定formatString的值
|
void |
setFormatter(org.apache.poi.ss.usermodel.DataFormatter formatter)
设定formatter的值
|
void |
setLastColumnNumber(int lastColumnNumber)
设定lastColumnNumber的值
|
void |
setNextDataType(XssfDataType nextDataType)
设定nextDataType的值
|
void |
setRowlist(List<String> rowlist)
设定rowlist的值
|
void |
setSharedStringsTable(org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable sharedStringsTable)
设定sharedStringsTable的值
|
void |
setSheetData(List<String[]> sheetData)
设定sheetData的值
|
void |
setSheetIndex(int sheetIndex)
设定sheetIndex的值
|
void |
setStylesTable(org.apache.poi.xssf.model.StylesTable stylesTable)
设定stylesTable的值
|
void |
setThisColumn(int thisColumn)
设定thisColumn的值
|
void |
setValue(StringBuffer value)
设定value的值
|
void |
setvIsOpen(boolean vIsOpen)
设定vIsOpen的值
|
void |
setWorkData(Map<Integer,List<String[]>> workData)
设定workData的值
|
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
Receive notification of the start of an element.
|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public void process(InputStream fileStream, boolean isMuti)
fileStream
- 文件流isMuti
- 是否多个sheetpublic void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).
startElement
in interface ContentHandler
startElement
in class DefaultHandler
uri
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.name
- The qualified name (with prefix), or the
empty string if qualified names are not available.attributes
- The attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String uri, String localName, String name) throws SAXException
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).
endElement
in interface ContentHandler
endElement
in class DefaultHandler
uri
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.name
- The qualified name (with prefix), or the
empty string if qualified names are not available.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- char[] 添加字符串start
- 开始位置length
- 长度SAXException
- SAX异常public List<String[]> getSheetData(Integer sheetIndex)
sheetIndex
- sheet下标public org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable getSharedStringsTable()
public void setSharedStringsTable(org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable sharedStringsTable)
sharedStringsTable
- 设定值public boolean isvIsOpen()
public void setvIsOpen(boolean vIsOpen)
vIsOpen
- 设定值public XssfDataType getNextDataType()
public void setNextDataType(XssfDataType nextDataType)
nextDataType
- 设定值public int getThisColumn()
public void setThisColumn(int thisColumn)
thisColumn
- 设定值public int getLastColumnNumber()
public void setLastColumnNumber(int lastColumnNumber)
lastColumnNumber
- 设定值public StringBuffer getValue()
public void setValue(StringBuffer value)
value
- 设定值public int getSheetIndex()
public void setSheetIndex(int sheetIndex)
sheetIndex
- 设定值public void setWorkData(Map<Integer,List<String[]>> workData)
workData
- 设定值public org.apache.poi.ss.usermodel.DataFormatter getFormatter()
public void setFormatter(org.apache.poi.ss.usermodel.DataFormatter formatter)
formatter
- 设定值public short getFormatIndex()
public void setFormatIndex(short formatIndex)
formatIndex
- 设定值public String getFormatString()
public void setFormatString(String formatString)
formatString
- 设定值public org.apache.poi.xssf.model.StylesTable getStylesTable()
public void setStylesTable(org.apache.poi.xssf.model.StylesTable stylesTable)
stylesTable
- 设定值public int getMinColumnCount()
Copyright © 2021. All rights reserved.