public class XMLSheet extends Object implements Sheet
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
XMLSheet.Marker
保存工作表当前状态并担任reset方法还原
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected char[] |
cb |
protected Dimension |
dimension |
protected Drawings |
drawings |
protected ZipEntry |
entry |
protected boolean |
eof |
protected HeaderRow |
header |
protected boolean |
heof |
protected boolean |
hidden |
protected int |
hrf |
protected int |
hrl |
protected int |
id |
protected int |
index |
protected long |
lastRowMark |
protected int |
length |
protected long |
mark |
protected String |
name |
protected int |
nChar |
protected int |
option |
protected String |
path |
protected Reader |
reader |
protected RelManager |
relManager |
protected XMLRow |
sRow |
protected SharedStrings |
sst
The Shared String Table
|
protected int |
startRow
已过时。
未使用,下个版本删除
|
protected Styles |
styles
The
Styles |
protected boolean |
useCurrentRow |
protected ZipFile |
zipFile |
| 限定符和类型 | 方法和说明 |
|---|---|
FullSheet |
asFullSheet()
将工作表转为
FullSheet支持全属性读取 |
XMLSheet |
asSheet()
将工作表转为普通工作表
Sheet,它只专注获取值 |
XMLSheet |
bind(Class<?> clazz)
Set the binding type
|
Sheet |
bind(Class<?> clazz,
Row row)
绑定数据类型并指定表头,后续可以通过
Row.get()方法直接将行数据转为指定的对象 |
void |
close()
close reader
|
protected Row |
createHeader(char[] cb,
int start,
int n) |
XMLRow |
createRow() |
Iterator<Row> |
dataIterator()
Iterating over data rows without header information and blank lines
|
protected Row |
findRow0() |
Dimension |
getDimension()
Returns The range address of the used area in
the current sheet
NOTE: This method can only guarantee accurate row ranges
|
int |
getFirstRow()
已过时。
无效方法后续删除
|
Row |
getHeader()
Returns the header of the list.
|
protected Row |
getHeader(int fromRowNum,
int toRowNum) |
int |
getHeaderColumnReadOption()
Returns Header column options
|
int |
getId()
Returns the worksheet id
|
int |
getIndex()
The index of worksheet located at the workbook
|
String |
getName()
The worksheet name
|
RelManager |
getRelManager()
获取关系管理器
|
Sheet |
header(int fromRowNum,
int toRowNum)
Specify the header rows endpoint
Note: After specifying the header row number, the row-pointer will move to the
next row of the header range.
|
boolean |
isHidden()
Test Worksheet is hidden
|
Iterator<Row> |
iterator()
Iterating each row of data contains header information and blank lines
|
List<Drawings.Picture> |
listPictures()
List all pictures in workbook
|
XMLSheet |
load()
加载sheet.xml并解析头信息,如果已加载则直接跳到标记位
|
protected XMLRow |
nextRow()
iterator rows
|
protected void |
parseBOF() |
protected Dimension |
parseDimension() |
XMLSheet |
reset()
Reset the
XMLSheet's row index to begging |
protected void |
setDrawings(Drawings drawings)
Setting the
Drawings info |
Sheet |
setHeaderColumnReadOption(int option)
Setting header columns preprocessing properties
|
protected void |
setId(int id)
Setting id of worksheet
|
protected void |
setIndex(int index) |
protected void |
setName(String name)
Setting the worksheet name
|
protected void |
setPath(String path)
Setting the worksheet xml path
|
protected void |
setSharedStrings(SharedStrings sst)
Setting the Shared String Table
|
protected void |
setStyles(Styles styles)
Setting
Styles |
protected void |
setZipEntry(ZipEntry entry)
Setting the worksheet zip entry
|
protected void |
setZipFile(ZipFile zipFile)
Setting the source zip file
|
protected void |
subElement(char[] cb,
int offset,
int n) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddHeaderColumnReadOption, asCalcSheet, asMergeSheet, bind, bind, dataRows, forceImport, getSize, header, headerColumnIgnoreCase, headerColumnToCamelCase, isShow, rows, saveAsCSV, saveAsCSV, saveAsCSV, saveAsCSV, saveAsCSVprotected String name
protected int index
protected String path
protected int id
protected SharedStrings sst
@Deprecated protected int startRow
protected HeaderRow header
protected boolean hidden
protected boolean useCurrentRow
protected Dimension dimension
protected Drawings drawings
protected int hrf
protected int hrl
protected ZipFile zipFile
protected ZipEntry entry
protected int option
protected RelManager relManager
protected Reader reader
protected char[] cb
protected int nChar
protected int length
protected boolean eof
protected boolean heof
protected long mark
protected XMLRow sRow
protected long lastRowMark
public XMLSheet()
public XMLSheet(XMLSheet sheet)
protected void setName(String name)
name - the worksheet nameprotected void setPath(String path)
path - the temp pathprotected void setZipFile(ZipFile zipFile)
zipFile - source dataprotected void setZipEntry(ZipEntry entry)
entry - source dataprotected void setSharedStrings(SharedStrings sst)
sst - the SharedStringspublic int getIndex()
protected void setIndex(int index)
protected void setId(int id)
id - the id of worksheetprotected void setDrawings(Drawings drawings)
Drawings infodrawings - resource infopublic Dimension getDimension()
NOTE: This method can only guarantee accurate row ranges
getDimension 在接口中 SheetDimension ranges@Deprecated public int getFirstRow()
public boolean isHidden()
public Sheet header(int fromRowNum, int toRowNum)
Note: After specifying the header row number, the row-pointer will move to the
next row of the header range. The bind(Class), Sheet.bind(Class, int),
Sheet.bind(Class, int, int), Sheet.rows(), Sheet.dataRows(), iterator(),
and dataIterator() will all be affected.
header 在接口中 SheetfromRowNum - low endpoint (inclusive) of the worksheet (one base)toRowNum - high endpoint (inclusive) of the worksheet (one base)SheetIndexOutOfBoundsException - if fromRow less than 1IllegalArgumentException - if toRow less than fromRowpublic Row getHeader()
protected Row getHeader(int fromRowNum, int toRowNum)
public Sheet bind(Class<?> clazz, Row row)
SheetRow.get()方法直接将行数据转为指定的对象public RelManager getRelManager()
public XMLSheet load() throws IOException
load 在接口中 SheetIOException - if io error occurprotected void parseBOF()
throws IOException
IOExceptionprotected XMLRow nextRow()
protected Row findRow0()
public Iterator<Row> iterator()
public Iterator<Row> dataIterator()
dataIterator 在接口中 Sheetpublic List<Drawings.Picture> listPictures()
listPictures 在接口中 Sheetpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOException - if io error occurpublic Sheet setHeaderColumnReadOption(int option)
setHeaderColumnReadOption 在接口中 Sheetoption - 额外属性Sheetpublic int getHeaderColumnReadOption()
getHeaderColumnReadOption 在接口中 SheetSheetpublic XMLRow createRow()
protected Dimension parseDimension()
protected void subElement(char[] cb,
int offset,
int n)
protected Row createHeader(char[] cb, int start, int n)
public FullSheet asFullSheet()
SheetFullSheet支持全属性读取asFullSheet 在接口中 SheetFullSheetCopyright © 2025. All rights reserved.