org.ath.converters
Class Excel2Html

java.lang.Object
  extended by org.ath.converters.Excel2Html

public class Excel2Html
extends java.lang.Object


Field Summary
static java.lang.String TMP_COLUMN
           
static java.lang.String TMP_EIF
           
static java.lang.String TMP_ENDIF
           
static java.lang.String TMP_IFBEGIN1
           
static java.lang.String TMP_IFBEGIN2
           
static java.lang.String TMP_IFBG1
           
static java.lang.String TMP_IFBG2
           
static java.lang.String TMP_LOOPSTART
           
static java.lang.String TMP_LOOPSTOP
           
static java.lang.String TMP_PAGEFOOTER
           
static java.lang.String TMP_PAGEHEADER
           
static java.lang.String TMP_QRY_RPL
           
static java.lang.String TMP_TABLECOLUMN1
           
static java.lang.String TMP_TABLECOLUMN2
           
static java.lang.String TMP_TABLEFOOTER
           
static java.lang.String TMP_TABLEHEADER
           
static java.lang.String TMP_TABLEROWS
           
 
Constructor Summary
Excel2Html()
          Default constructor, most defaults are already set.
Excel2Html(java.lang.String excelfile, java.lang.String htmlfile)
          Minimal constructor, sets the minimally required parameters, being an Excel input file and a Html output file.
 
Method Summary
 boolean execute()
          Perform the work to be done.
 java.lang.String getDateformat()
           
 java.lang.String getDbgfile()
           
 int getDbglevel()
           
 java.lang.String getExcelfile()
           
 java.lang.String getFilterQuery()
           
 java.lang.String getHtmlfile()
           
 java.lang.String getHtmlmask()
           
 int getMaxrow()
           
 java.lang.String getNewfooter()
           
 java.lang.String getNewheader()
           
 int getRepeatcount()
           
 java.lang.String getRowformat()
           
 int getSheet()
           
 java.lang.String getSheetname()
           
 int getStartrow()
           
 java.lang.String getTblfooter()
           
 java.lang.String getTblheader()
           
 java.lang.String getTemplatefile()
           
 boolean isConditionOutput()
           
 boolean isDbg()
           
 boolean isLoopOutput()
           
 boolean isMultifile()
           
 boolean isQuiet()
           
 boolean isShowformulas()
           
 boolean isShowhelp()
           
 boolean isTableheadrow()
           
 void setConditionOutput(boolean conditionOutput)
           
 void setDateformat(java.lang.String dateformat)
           
 void setDbg(boolean dbg)
           
 void setDbgfile(java.lang.String dbgfile)
           
 void setDbglevel(int dbglevel)
           
 void setExcelfile(java.lang.String excelfile)
           
 void setFilterQuery(java.lang.String filterQuery)
           
 void setHtmlfile(java.lang.String htmlfile)
          Also determines if it's a multiple file specification and then sets the mask.
 void setLoopOutput(boolean loopOutput)
           
 void setMaxrow(int maxrow)
           
 void setNewfooter(java.lang.String newfooter)
           
 void setNewheader(java.lang.String newheader)
           
 void setQuiet(boolean quiet)
           
 void setRepeatcount(int repeatcount)
           
 void setRowformat(java.lang.String rowformat)
           
 void setSheet(int sheet)
           
 void setSheetname(java.lang.String sheetname)
           
 void setShowformulas(boolean showformulas)
           
 void setShowhelp(boolean showhelp)
           
 void setStartrow(int startrow)
           
 void setTableheadrow(boolean tableheadrow)
           
 void setTblfooter(java.lang.String tblfooter)
           
 void setTblheader(java.lang.String tblheader)
           
 void setTemplatefile(java.lang.String templatefile)
           
 void writeErrorLog(java.lang.String msg)
          Write an error message to the console (if quiet isn't set) and also to the log, if enabled.
 void writeLogLine(int level, java.lang.String msg)
          Write a log line if the debug-level is at least level.
 void writeLogLine(java.lang.String msg)
          Write a time-stamped message to the log file, if the name is know and debugging is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TMP_PAGEHEADER

public static final java.lang.String TMP_PAGEHEADER
See Also:
Constant Field Values

TMP_PAGEFOOTER

public static final java.lang.String TMP_PAGEFOOTER
See Also:
Constant Field Values

TMP_TABLEHEADER

public static final java.lang.String TMP_TABLEHEADER
See Also:
Constant Field Values

TMP_TABLEROWS

public static final java.lang.String TMP_TABLEROWS
See Also:
Constant Field Values

TMP_TABLEFOOTER

public static final java.lang.String TMP_TABLEFOOTER
See Also:
Constant Field Values

TMP_LOOPSTART

public static final java.lang.String TMP_LOOPSTART
See Also:
Constant Field Values

TMP_LOOPSTOP

public static final java.lang.String TMP_LOOPSTOP
See Also:
Constant Field Values

TMP_COLUMN

public static final java.lang.String TMP_COLUMN
See Also:
Constant Field Values

TMP_TABLECOLUMN1

public static final java.lang.String TMP_TABLECOLUMN1
See Also:
Constant Field Values

TMP_TABLECOLUMN2

public static final java.lang.String TMP_TABLECOLUMN2
See Also:
Constant Field Values

TMP_IFBEGIN1

public static final java.lang.String TMP_IFBEGIN1
See Also:
Constant Field Values

TMP_IFBEGIN2

public static final java.lang.String TMP_IFBEGIN2
See Also:
Constant Field Values

TMP_IFBG1

public static final java.lang.String TMP_IFBG1
See Also:
Constant Field Values

TMP_IFBG2

public static final java.lang.String TMP_IFBG2
See Also:
Constant Field Values

TMP_QRY_RPL

public static final java.lang.String TMP_QRY_RPL
See Also:
Constant Field Values

TMP_ENDIF

public static final java.lang.String TMP_ENDIF
See Also:
Constant Field Values

TMP_EIF

public static final java.lang.String TMP_EIF
See Also:
Constant Field Values
Constructor Detail

Excel2Html

public Excel2Html()
Default constructor, most defaults are already set.


Excel2Html

public Excel2Html(java.lang.String excelfile,
                  java.lang.String htmlfile)
Minimal constructor, sets the minimally required parameters, being an Excel input file and a Html output file.

Parameters:
excelfile - The file to read the data from.
htmlfile - Write to this file or set of files (multiple file mode is automatically determined).
Method Detail

execute

public boolean execute()
                throws java.io.IOException
Perform the work to be done.

Returns:
result of the operation, success or fail.
Throws:
java.io.IOException

writeErrorLog

public void writeErrorLog(java.lang.String msg)
Write an error message to the console (if quiet isn't set) and also to the log, if enabled.

Parameters:
msg - The message

writeLogLine

public void writeLogLine(java.lang.String msg)
Write a time-stamped message to the log file, if the name is know and debugging is enabled.

Parameters:
msg - The message

writeLogLine

public void writeLogLine(int level,
                         java.lang.String msg)
Write a log line if the debug-level is at least level.

Parameters:
level - the level to trigger at
msg - the message to log

getExcelfile

public java.lang.String getExcelfile()
Returns:
the excelfile

setExcelfile

public void setExcelfile(java.lang.String excelfile)
Parameters:
excelfile - the excelfile to set

getSheet

public int getSheet()
Returns:
the sheet

setSheet

public void setSheet(int sheet)
Parameters:
sheet - the sheet to set

getSheetname

public java.lang.String getSheetname()
Returns:
the sheet-name

setSheetname

public void setSheetname(java.lang.String sheetname)
Parameters:
sheetname - the sheet-name to set

getHtmlfile

public java.lang.String getHtmlfile()
Returns:
the htmlfile

setHtmlfile

public void setHtmlfile(java.lang.String htmlfile)
Also determines if it's a multiple file specification and then sets the mask.

Parameters:
htmlfile - the htmlfile to set

getHtmlmask

public java.lang.String getHtmlmask()
Returns:
the htmlmask

isMultifile

public boolean isMultifile()
Returns:
the multifile

getTemplatefile

public java.lang.String getTemplatefile()
Returns:
the templatefile

setTemplatefile

public void setTemplatefile(java.lang.String templatefile)
Parameters:
templatefile - the templatefile to set

isTableheadrow

public boolean isTableheadrow()
Returns:
the tableheadrow

setTableheadrow

public void setTableheadrow(boolean tableheadrow)
Parameters:
tableheadrow - the tableheadrow to set

getRepeatcount

public int getRepeatcount()
Returns:
the repeatcount

setRepeatcount

public void setRepeatcount(int repeatcount)
Parameters:
repeatcount - the repeatcount to set

getNewheader

public java.lang.String getNewheader()
Returns:
the newheader

setNewheader

public void setNewheader(java.lang.String newheader)
Parameters:
newheader - the newheader to set

getNewfooter

public java.lang.String getNewfooter()
Returns:
the newfooter

setNewfooter

public void setNewfooter(java.lang.String newfooter)
Parameters:
newfooter - the newfooter to set

getTblheader

public java.lang.String getTblheader()
Returns:
the tblheader

setTblheader

public void setTblheader(java.lang.String tblheader)
Parameters:
tblheader - the tblheader to set

getTblfooter

public java.lang.String getTblfooter()
Returns:
the tblfooter

setTblfooter

public void setTblfooter(java.lang.String tblfooter)
Parameters:
tblfooter - the tblfooter to set

getStartrow

public int getStartrow()
Returns:
the startrow

setStartrow

public void setStartrow(int startrow)
Parameters:
startrow - the startrow to set

getMaxrow

public int getMaxrow()
Returns:
the maxrow

setMaxrow

public void setMaxrow(int maxrow)
Parameters:
maxrow - the maxrow to set

isShowhelp

public boolean isShowhelp()
Returns:
the showhelp

setShowhelp

public void setShowhelp(boolean showhelp)
Parameters:
showhelp - the showhelp to set

getRowformat

public java.lang.String getRowformat()
Returns:
the rowformat

setRowformat

public void setRowformat(java.lang.String rowformat)
Parameters:
rowformat - the rowformat to set

isQuiet

public boolean isQuiet()
Returns:
the quiet

setQuiet

public void setQuiet(boolean quiet)
Parameters:
quiet - the quiet to set

isDbg

public boolean isDbg()
Returns:
the dbg

setDbg

public void setDbg(boolean dbg)
Parameters:
dbg - the dbg to set

getDbgfile

public java.lang.String getDbgfile()
Returns:
the dbgfile

setDbgfile

public void setDbgfile(java.lang.String dbgfile)
Parameters:
dbgfile - the dbgfile to set

getDbglevel

public int getDbglevel()
Returns:
the debug level

setDbglevel

public void setDbglevel(int dbglevel)
Parameters:
dbglevel - the debug level to set

getDateformat

public java.lang.String getDateformat()
Returns:
the dateformat

setDateformat

public void setDateformat(java.lang.String dateformat)
Parameters:
dateformat - the dateformat to set

isShowformulas

public boolean isShowformulas()
Returns:
the showformulas

setShowformulas

public void setShowformulas(boolean showformulas)
Parameters:
showformulas - the showformulas to set

getFilterQuery

public java.lang.String getFilterQuery()
Returns:
the filterQuery

setFilterQuery

public void setFilterQuery(java.lang.String filterQuery)
Parameters:
filterQuery - the filterQuery to set

isConditionOutput

public boolean isConditionOutput()
Returns:
the conditionOutput

setConditionOutput

public void setConditionOutput(boolean conditionOutput)
Parameters:
conditionOutput - the conditionOutput to set

isLoopOutput

public boolean isLoopOutput()
Returns:
the loopOutput

setLoopOutput

public void setLoopOutput(boolean loopOutput)
Parameters:
loopOutput - the loopOutput to set