public class XMLSheet extends Object implements Sheet
| 限定符和类型 | 字段和说明 |
|---|---|
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 XMLRow |
sRow |
protected SharedStrings |
sst
The Shared String Table
|
protected int |
startRow |
protected Styles |
styles
The
Styles |
protected ZipFile |
zipFile |
| 限定符和类型 | 方法和说明 |
|---|---|
org.ttzero.excel.reader.XMLCalcSheet |
asCalcSheet()
Make worksheets parse formulas
|
org.ttzero.excel.reader.XMLMergeSheet |
asMergeSheet()
Make worksheets copy value on merge cells
|
XMLSheet |
asSheet()
Make worksheets parse value only
|
XMLSheet |
bind(Class<?> clazz)
Set the binding type
|
Sheet |
bind(Class<?> clazz,
Row row)
Set the binding type
|
void |
close()
close reader
|
XMLRow |
createRow()
Create a
Row to read |
Iterator<Row> |
dataIterator()
Iterating over data rows without header information and blank lines
|
protected Row |
findRow0(org.ttzero.excel.reader.XMLSheet.HeaderRowFunc func) |
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()
The index of first used row
|
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
|
int |
getSize()
已过时。
use
getDimension() to getting full range address |
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()
Load sheet.xml as BufferedReader
|
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 |
setSst(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
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddHeaderColumnReadOption, bind, bind, col2Int, dataRows, forceImport, header, headerColumnIgnoreCase, headerColumnToCamelCase, isShow, rows, saveAsCSV, saveAsCSV, saveAsCSV, saveAsCSV, saveAsCSVprotected String name
protected int index
protected String path
protected int id
protected SharedStrings sst
protected int startRow
protected HeaderRow header
protected boolean hidden
protected Dimension dimension
protected Drawings drawings
protected int hrf
protected int hrl
protected ZipFile zipFile
protected ZipEntry entry
protected int option
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 setSst(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 info@Deprecated public int getSize()
getDimension() to getting full range addresspublic Dimension getDimension()
NOTE: This method can only guarantee accurate row ranges
getDimension 在接口中 SheetDimension rangespublic 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 XMLSheet load() throws IOException
load 在接口中 SheetIOException - if io error occurprotected Row findRow0(org.ttzero.excel.reader.XMLSheet.HeaderRowFunc func)
public Iterator<Row> iterator()
public Iterator<Row> dataIterator()
dataIterator 在接口中 Sheetpublic List<Drawings.Picture> listPictures()
listPictures 在接口中 Sheetpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 SheetIOException - if io error occurpublic Sheet setHeaderColumnReadOption(int option)
setHeaderColumnReadOption 在接口中 Sheetoption - header column optionsSheetpublic int getHeaderColumnReadOption()
getHeaderColumnReadOption 在接口中 SheetSheetpublic org.ttzero.excel.reader.XMLCalcSheet asCalcSheet()
SheetasCalcSheet 在接口中 SheetCalcSheetpublic org.ttzero.excel.reader.XMLMergeSheet asMergeSheet()
SheetasMergeSheet 在接口中 SheetMergeSheetCopyright © 2023. All rights reserved.