|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.bezier.data.XlsReader
public class XlsReader
XlsReader, a reader for .xls files (OpenOffice, Microsoft Excel) based on the Apache POI library.
"
Apache POI - Java API To Access Microsoft Format Files"
Apache POI QuickRef
Apache POI Documentation
Constructor Summary | |
---|---|
XlsReader(processing.core.PApplet thePapplet,
java.lang.String theXlsFile)
XlsReader constructor. |
Method Summary | |
---|---|
void |
firstCell()
Jump to the first cell of a row. |
void |
firstRow()
Jump to the first row of a sheet. |
int |
getCellNum()
Returns the index of the currently selected cell. |
int |
getFirstRowNum()
Read the index of the first not empty row of the current sheet. |
float |
getFloat()
Return a float value from the selected cell of the selected row of current sheet. |
float |
getFloat(int rowNum,
int cellNum)
Return an float value from a specific cell of the current sheet. |
int |
getInt()
Return an int value from the selected cell of the selected row of current sheet. |
int |
getInt(int rowNum,
int cellNum)
Return an int value from a specific cell of the current sheet. |
int |
getLastRowNum()
Read the index of the last available row of the current sheet. |
int |
getRowNum()
Read the index of the current row of the current sheet. |
java.lang.String |
getString()
Return a String value from the selected cell of the selected row of current sheet. |
java.lang.String |
getString(int rowNum,
int cellNum)
Return a string value (text) from a specific cell of the current sheet. |
boolean |
hasMoreCells()
Check if the cell iterator has more cells available to be read for the current row. |
boolean |
hasMoreRows()
Check if the row iterator has more row available to be read. |
void |
nextCell()
Select the next (or first) cell of the selected row of current sheet. |
void |
nextRow()
Select the next (or first) row of current sheet. |
void |
openSheet(int page)
Jump to a different page (sheet) inside of the xls file. |
void |
resetCell()
Select no cell of the selected row of current sheet. |
void |
showWarnings(boolean enable)
Enable or diable warnings. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XlsReader(processing.core.PApplet thePapplet, java.lang.String theXlsFile)
thePapplet
- Normally just pass "this", which is your sketchtheXlsFile
- Path to xls fileMethod Detail |
---|
public void showWarnings(boolean enable)
enable
- Turn warnings on or off.public void openSheet(int page)
page
- Page / sheet number to jump to, first page is at 0public int getFirstRowNum()
public int getRowNum()
public int getLastRowNum()
public void firstRow()
public void nextRow()
public boolean hasMoreRows()
This can be used in while() loops
while ( reader.hasMoreRows() ) { // jump to the next row reader.nextRow(); // read cell, eventually loop cells with another while() loop. }
public boolean hasMoreCells()
This can be used in while() loops
while ( reader.hasMoreCells() ) { // jump to the next cell reader.nextCell(); // read cell value }
public int getCellNum()
public void resetCell()
public void firstCell()
public void nextCell()
public java.lang.String getString()
public int getInt()
public float getFloat()
public int getInt(int rowNum, int cellNum)
rowNum
- Row (vertically) to read from. First row is 0.cellNum
- Cell (horizontal) in the row to read from. Starts at 0.
public float getFloat(int rowNum, int cellNum)
rowNum
- Row (vertically) to read from. First row is 0.cellNum
- Cell (horizontal) in the row to read from. Starts at 0.
public java.lang.String getString(int rowNum, int cellNum)
rowNum
- Row (vertically) to read from. First row is 0.cellNum
- Cell (horizontal) in the row to read from. Starts at 0.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |