adams.data.io.input
Class ExcelSAXSpreadSheetReader
java.lang.Object
adams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.io.input.AbstractSpreadSheetReader
adams.data.io.input.AbstractSpreadSheetReaderWithMissingValueSupport
adams.data.io.input.AbstractExcelSpreadSheetReader
adams.data.io.input.ExcelSAXSpreadSheetReader
- All Implemented Interfaces:
- adams.core.Debuggable, adams.core.Destroyable, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.core.Stoppable, Serializable
public class ExcelSAXSpreadSheetReader
- extends AbstractExcelSpreadSheetReader
Reads large MS Excel XML files (using SAX).
Caveat: date/time columns don't get imported correctly.
Valid options are:
-D <int> (property: debugLevel)
The greater the number the more additional info the scheme may output to
the console (0 = off).
default: 0
minimum: 0
-missing <java.lang.String> (property: missingValue)
The placeholder for missing values.
default: ?
-sheet <adams.core.Index> (property: sheetIndex)
The index of the sheet to load; An index is a number starting with 1; the
following placeholders can be used as well: first, second, third, last_2,
last_1, last
default: first
-no-auto-extend-header (property: autoExtendHeader)
If enabled, the header gets automatically extended if rows have more cells
than the header.
-text-columns <java.lang.String> (property: textColumns)
The range of columns to treat as text; A range is a comma-separated list
of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(..
.)' inverts the range '...'; the following placeholders can be used as well:
first, second, third, last_2, last_1, last
default:
- Version:
- $Revision: 6291 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class adams.data.io.input.AbstractSpreadSheetReader |
adams.data.io.input.AbstractSpreadSheetReader.InputType |
| Fields inherited from class adams.data.io.input.AbstractSpreadSheetReaderWithMissingValueSupport |
m_MissingValue |
| Fields inherited from class adams.data.io.input.AbstractSpreadSheetReader |
m_DataRowType, m_Stopped |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
m_DebugLevel, m_OptionManager |
|
Method Summary |
protected adams.data.spreadsheet.SpreadSheet |
doRead(File file)
Reads the spreadsheet content from the specified file. |
String |
getFormatDescription()
Returns a string describing the format (used in the file chooser). |
String[] |
getFormatExtensions()
Returns the extension(s) of the format. |
protected adams.data.io.input.AbstractSpreadSheetReader.InputType |
getInputType()
Returns how to read the data, from a file, stream or reader. |
String |
globalInfo()
Returns a string describing the object. |
| Methods inherited from class adams.data.io.input.AbstractExcelSpreadSheetReader |
autoExtendHeaderTipText, defineOptions, getAutoExtendHeader, getSheetIndex, getTextColumns, initialize, setAutoExtendHeader, setSheetIndex, setTextColumns, sheetIndexTipText, textColumnsTipText |
| Methods inherited from class adams.data.io.input.AbstractSpreadSheetReaderWithMissingValueSupport |
getMissingValue, missingValueTipText, setMissingValue |
| Methods inherited from class adams.data.io.input.AbstractSpreadSheetReader |
dataRowTypeTipText, doRead, doRead, getDataRowType, getReaders, read, read, read, read, setDataRowType, stopExecution |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
getDebugging, getSystemErr, getSystemOut, sizeOf |
ExcelSAXSpreadSheetReader
public ExcelSAXSpreadSheetReader()
globalInfo
public String globalInfo()
- Returns a string describing the object.
- Specified by:
globalInfo in class adams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
getFormatDescription
public String getFormatDescription()
- Returns a string describing the format (used in the file chooser).
- Specified by:
getFormatDescription in class adams.data.io.input.AbstractSpreadSheetReader
- Returns:
- a description suitable for displaying in the
file chooser
getFormatExtensions
public String[] getFormatExtensions()
- Returns the extension(s) of the format.
- Specified by:
getFormatExtensions in class adams.data.io.input.AbstractSpreadSheetReader
- Returns:
- the extension (without the dot!)
getInputType
protected adams.data.io.input.AbstractSpreadSheetReader.InputType getInputType()
- Returns how to read the data, from a file, stream or reader.
- Specified by:
getInputType in class adams.data.io.input.AbstractSpreadSheetReader
- Returns:
- how to read the data
doRead
protected adams.data.spreadsheet.SpreadSheet doRead(File file)
- Reads the spreadsheet content from the specified file.
- Overrides:
doRead in class adams.data.io.input.AbstractSpreadSheetReader
- Parameters:
file - the file to read from
- Returns:
- the spreadsheet or null in case of an error
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.