|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsql.DMExecuted
dsql.value.Value
dsql.value.NonScalarValue
dsql.value.TableResult
dsql.value.AbstractResults
dsql.value.ExcelDataValue
Read an excel file using the POI library (http://jakarta.apache.org/poi/). The results is the set of all sheets, each sheet correspond to a table
Field Summary |
Fields inherited from class dsql.value.TableResult |
primaryKeys |
Constructor Summary | |
ExcelDataValue()
|
Method Summary | |
void |
addCurrentResultMeta(ConstructedResults r)
|
void |
allreset()
|
protected java.lang.String |
convertDateFormatString(java.lang.String formatStr)
|
int |
currentRecord()
|
void |
deleteRecord()
|
protected int |
findColumn(java.lang.String label)
|
protected boolean |
first100AreInteger(short col)
there is no way to know if numeric cells with generic format are reals or integers... this method returns true if the first 100 rows do not include reals (or dates) |
protected int |
getCellType(org.apache.poi.hssf.usermodel.HSSFCell cell)
|
java.lang.Object |
getColumn(int i)
|
java.lang.Object |
getColumn(java.lang.String s)
|
int |
getColumnCount()
|
int |
getColumnDisplaySize(int i)
|
java.lang.String |
getColumnLabel(int i)
|
java.lang.String |
getColumnString(int i)
First column is 1 |
java.lang.String |
getColumnString(java.lang.String s)
|
ConstructedResults |
getMeta(boolean all)
|
int |
getRecordCount()
this function should be called with care as it can be computationaly expensive for SQL Cursors! |
protected java.lang.String[] |
getSheetFormats()
|
protected java.lang.String[] |
getSheetInternalFormats()
|
protected java.lang.String[] |
getSheetLabels()
find labels from first non-empty row, null if not found side-effect: set firstRowIndex |
protected int[] |
getSheetTypes()
find types from first non-empty row, null if not found must be called after getSheetLabels() side-effect: set firstRowIndex |
protected java.lang.String |
getStringCellValue(short i)
|
void |
gotoRecord(int pos)
first record is 1 |
void |
gotoSheet(int index)
|
boolean |
hasResult()
|
void |
insert(ColumnHolder rec)
|
boolean |
nextRecord()
|
boolean |
nextResult()
|
java.lang.String[] |
readCurrentRecord()
|
void |
reset()
|
void |
setContents(ASTXMLElement ele)
set contents from XML |
void |
setContents(java.lang.String _fileName,
ASTXMLElement ele)
set contents from file |
java.lang.String |
toString()
|
void |
update(ColumnHolder rec)
|
Methods inherited from class dsql.value.AbstractResults |
getMeta, print |
Methods inherited from class dsql.value.TableResult |
equalsRecord, getBoolean, getField, getPrimaryKeys, getRecord, getRecord, getString, getTableName, printRecord, setPrimaryKeys, setPrimaryKeys, setRecord |
Methods inherited from class dsql.value.NonScalarValue |
getFields, isScalar, setField |
Methods inherited from class dsql.value.Value |
getFloat, getInt, getObject, getObjectClass, getRecordHolder, getType, getValue, getValue |
Methods inherited from class dsql.DMExecuted |
getCaller, setCaller |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExcelDataValue()
Method Detail |
public java.lang.String toString()
public ConstructedResults getMeta(boolean all) throws ExecuteException
getMeta
in class AbstractResults
all
- if true, iterates through all results
ExecuteException
public void addCurrentResultMeta(ConstructedResults r) throws ExecuteException
addCurrentResultMeta
in class AbstractResults
ExecuteException
public void setContents(ASTXMLElement ele) throws ExecuteException
DataValue
setContents
in interface DataValue
ExecuteException
public void setContents(java.lang.String _fileName, ASTXMLElement ele) throws ExecuteException
DataValue
setContents
in interface DataValue
ExecuteException
public void allreset() throws ExecuteException
allreset
in class AbstractResults
ExecuteException
public boolean hasResult()
hasResult
in class AbstractResults
public boolean nextResult() throws ExecuteException
nextResult
in class AbstractResults
ExecuteException
public void reset()
reset
in interface Cursor
public java.lang.String[] readCurrentRecord() throws ExecuteException
readCurrentRecord
in class TableResult
ExecuteException
public int getRecordCount()
RecordHolder
getRecordCount
in interface RecordHolder
public boolean nextRecord()
nextRecord
in interface Cursor
public void gotoRecord(int pos)
gotoRecord
in interface Cursor
pos
- is the record position: 1 is the first record,
0 is the record before first, -1 is after the last recordpublic int currentRecord()
currentRecord
in interface Cursor
public java.lang.String getColumnString(int i) throws ExecuteException
getColumnString
in interface ColumnHolder
ExecuteException
public java.lang.Object getColumn(int i) throws ExecuteException
getColumn
in interface ColumnHolder
i
- column number (first column is 1)
XmlDataValue
.
ExecuteException
public java.lang.String getColumnString(java.lang.String s) throws ExecuteException
getColumnString
in interface ColumnHolder
ExecuteException
public java.lang.Object getColumn(java.lang.String s) throws ExecuteException
getColumn
in interface ColumnHolder
s
- column name
XmlDataValue
.
ExecuteException
public int getColumnCount() throws ExecuteException
getColumnCount
in interface ColumnHolder
ExecuteException
public java.lang.String getColumnLabel(int i)
getColumnLabel
in interface ColumnHolder
public int getColumnDisplaySize(int i) throws ExecuteException
getColumnDisplaySize
in interface ColumnHolder
getColumnDisplaySize
in class TableResult
ExecuteException
public void gotoSheet(int index) throws ExecuteException
ExecuteException
public void insert(ColumnHolder rec) throws ExecuteException
insert
in class TableResult
ExecuteException
public void deleteRecord() throws ExecuteException
deleteRecord
in class TableResult
ExecuteException
public void update(ColumnHolder rec) throws ExecuteException
update
in class TableResult
ExecuteException
protected int findColumn(java.lang.String label) throws ExecuteException
findColumn
in class TableResult
ExecuteException
protected java.lang.String getStringCellValue(short i)
protected int getCellType(org.apache.poi.hssf.usermodel.HSSFCell cell)
protected java.lang.String convertDateFormatString(java.lang.String formatStr)
protected java.lang.String[] getSheetLabels() throws ExecuteException
ExecuteException
protected int[] getSheetTypes() throws ExecuteException
ExecuteException
protected java.lang.String[] getSheetFormats() throws ExecuteException
ExecuteException
protected java.lang.String[] getSheetInternalFormats() throws ExecuteException
ExecuteException
protected boolean first100AreInteger(short col)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |