|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.importers.ExcelWrapper
public class ExcelWrapper
A Class that wraps a Microsoft(tm) Excel(tm) Spreadsheet using Apache's HSSF (Horrible Spread Sheet Format) as used in Excel 97 thru 2002. This class simplifies POI in that it gives only read access and only for string data. Refernces to cells containing non-string-values will try to return an appropriate conversion to String.
Constructor Summary | |
---|---|
ExcelWrapper()
|
Method Summary | |
---|---|
int |
getFirstRow()
return the index of the first row containing data |
int |
getLastRow()
return the index of the last row containing data |
java.util.List<java.lang.String> |
getRow(int rowNr)
Return a row of data from the sheet. |
static java.lang.String |
getSafe(java.util.List<java.lang.String> row,
int col)
Get a Value safely (t.i: Don't thrwow an exeption if the index is tu large but return an empty string instead. |
boolean |
load(java.io.InputStream inputStream,
int page)
Load a specific page of the given Excel Spreadsheet |
boolean |
load(java.lang.String file,
int page)
Deprecated. use load(InputStream) instead |
void |
setFieldTypes(java.lang.Class<?>[] types)
Set the type for each field of the calc sheet. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExcelWrapper()
Method Detail |
---|
@Deprecated public boolean load(java.lang.String file, int page)
file
- filename of the Excel filepage
- page to use
public boolean load(java.io.InputStream inputStream, int page)
bytes
- Excel content as byte arraypage
- page to use
public void setFieldTypes(java.lang.Class<?>[] types)
types
- Java Classes denoting the field typespublic java.util.List<java.lang.String> getRow(int rowNr)
rowNr
- zero based index of the desired row
public int getFirstRow()
public int getLastRow()
public static java.lang.String getSafe(java.util.List<java.lang.String> row, int col)
row
- a List of Stringscol
- index to retrieve
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |