|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ksu.cis.kdd.data.converter.excel.ExcelConverter
Microsoft(R) Excel(TM) format.
User has the option of including the range of cells that contains the actual data. If the ranges are not specified, then the data is assumed to begin at cell A1 and ends at the row/column size returned by the API.
The actual data must include the title row as the first row AND assuming that between the title row and the actual data there are no blank rows. Also, it is not allowed to have a merged columns at any time. Otherwise the program will throw errors silently.
If we have PRM (or multiple tables), each table must be written in separate sheet. Also, please delete any superfluous / empty sheet so that the "autodetection" can work.
Currently, no charts or pictures are allowed. And there is no way to recover primary / reference key in here (except if we somehow "cheat" later, but definitely not now).
NOTE: Everything is imported as string for now!!!
Field Summary | |
protected ExcelSheetRange[] |
ranges
Range of cells (in each sheet) that contains the actual data. |
Constructor Summary | |
ExcelConverter()
|
Method Summary | |
void |
initialize()
|
Database |
load(java.io.InputStream stream)
|
void |
save(java.io.OutputStream stream,
Database db)
|
void |
setRanges(ExcelSheetRange[] ranges)
|
void |
setRanges(java.lang.String str)
Specify the ranges of cells in each sheet, if it doesn't start at A1 as requested (see header). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ExcelSheetRange[] ranges
Constructor Detail |
public ExcelConverter()
Method Detail |
public void initialize()
initialize
in interface Converter
Converter.initialize()
public void setRanges(ExcelSheetRange[] ranges)
public void setRanges(java.lang.String str)
Specify the ranges of cells in each sheet, if it doesn't start at A1
as requested (see header). E.g.:
B5:G10,A2:H8,B4:J15
That means that the first sheet's data is at B5:G10 cells, second sheet data is at A2:H8, third sheet is at B4:J15 (just like Excel).
Note: If you specify this from the command line, you cannot insert spaces between the commas.
str
- public Database load(java.io.InputStream stream)
load
in interface Converter
Converter.load(java.io.InputStream)
public void save(java.io.OutputStream stream, Database db)
save
in interface Converter
edu.ksu.cis.kdd.data.converter.Converter#save(java.io.OutputStream, edu.ksu.cis.kdd.data.datastructure.Table)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |