|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.converters.AbstractLoader
weka.core.converters.AbstractFileLoader
weka.core.converters.ExcelLoader
public class ExcelLoader
Reads a source that is in the Excel spreadsheet format.
For instance, a spreadsheet generated with the Microsoft Office Suite.
-sheet <index> The index of the sheet to load; 'first' and 'last' are accepted as well.
-M <str> The string representing a missing value. (default: '')For a tutorial on ExcelDOM, see:
Loader
,
Serialized FormField Summary | |
---|---|
static String |
FILE_DESCRIPTION
the file description. |
static String |
FILE_EXTENSION
the binary file extension. |
static String |
FILE_EXTENSION_OOXML
the OOXML file extension. |
Fields inherited from class weka.core.converters.AbstractFileLoader |
---|
FILE_EXTENSION_COMPRESSED |
Fields inherited from interface weka.core.converters.Loader |
---|
BATCH, INCREMENTAL, NONE |
Constructor Summary | |
---|---|
ExcelLoader()
|
Method Summary | |
---|---|
weka.core.Instances |
getDataSet()
Return the full data set. |
String |
getFileDescription()
Returns a description of the file type. |
String |
getFileExtension()
Get the file extension used for JSON files. |
String[] |
getFileExtensions()
Gets all the file extensions used for this type of file. |
String |
getMissingValue()
Returns the current placeholder for missing values. |
weka.core.Instance |
getNextInstance(weka.core.Instances structure)
JSONLoader is unable to process a data set incrementally. |
String[] |
getOptions()
returns the options of the current setup. |
String |
getRevision()
Returns the revision string. |
String |
getSheetIndex()
Returns the index of the sheet to load. |
weka.core.Instances |
getStructure()
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances. |
String |
globalInfo()
Returns a string describing this Loader. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(String[] args)
Main method. |
String |
missingValueTipText()
Returns the tip text for this property. |
void |
reset()
Resets the Loader ready to read a new data set. |
String |
retrieveURL()
Return the current url. |
void |
setMissingValue(String value)
Sets the placeholder for missing values. |
void |
setOptions(String[] options)
Parses the options for this object. |
void |
setSheetIndex(String value)
Sets the index of the sheet to load. |
void |
setSource(InputStream in)
Resets the Loader object and sets the source of the data set to be the supplied InputStream. |
void |
setSource(URL url)
Resets the Loader object and sets the source of the data set to be the supplied url. |
void |
setURL(String url)
Set the url to load from. |
String |
sheetIndexTipText()
Returns the tip text for this property. |
Methods inherited from class weka.core.converters.AbstractFileLoader |
---|
getUseRelativePath, retrieveFile, runFileLoader, setEnvironment, setFile, setSource, setUseRelativePath, useRelativePathTipText |
Methods inherited from class weka.core.converters.AbstractLoader |
---|
setRetrieval |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String FILE_EXTENSION
public static String FILE_EXTENSION_OOXML
public static String FILE_DESCRIPTION
Constructor Detail |
---|
public ExcelLoader()
Method Detail |
---|
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
public String[] getOptions()
getOptions
in interface weka.core.OptionHandler
public void setOptions(String[] options) throws Exception
-sheet <index> The index of the sheet to load; 'first' and 'last' are accepted as well.
-M <str> The string representing a missing value. (default: '')
setOptions
in interface weka.core.OptionHandler
options
- the options to use
Exception
- if setting of options failspublic void setMissingValue(String value)
value
- the placeholderpublic String getMissingValue()
public String missingValueTipText()
public String getFileExtension()
getFileExtension
in interface weka.core.converters.FileSourcedConverter
public String[] getFileExtensions()
getFileExtensions
in interface weka.core.converters.FileSourcedConverter
public String getFileDescription()
getFileDescription
in interface weka.core.converters.FileSourcedConverter
public void reset() throws IOException
reset
in interface weka.core.converters.Loader
reset
in class weka.core.converters.AbstractFileLoader
IOException
- if something goes wrongpublic void setSheetIndex(String value)
value
- the index (1-based, 'first' and 'last' accepted as well)public String getSheetIndex()
public String sheetIndexTipText()
public void setSource(URL url) throws IOException
url
- the source url.
IOException
- if an error occurspublic void setURL(String url) throws IOException
setURL
in interface weka.core.converters.URLSourcedLoader
url
- the url to load from
IOException
- if the url can't be set.public String retrieveURL()
retrieveURL
in interface weka.core.converters.URLSourcedLoader
public void setSource(InputStream in) throws IOException
setSource
in interface weka.core.converters.Loader
setSource
in class weka.core.converters.AbstractLoader
in
- the source InputStream.
IOException
- if initialization of reader fails.public weka.core.Instances getStructure() throws IOException
getStructure
in interface weka.core.converters.Loader
getStructure
in class weka.core.converters.AbstractLoader
IOException
- if an error occurspublic weka.core.Instances getDataSet() throws IOException
getDataSet
in interface weka.core.converters.Loader
getDataSet
in class weka.core.converters.AbstractLoader
IOException
- if there is no source or parsing failspublic weka.core.Instance getNextInstance(weka.core.Instances structure) throws IOException
getNextInstance
in interface weka.core.converters.Loader
getNextInstance
in class weka.core.converters.AbstractLoader
structure
- ignored
IOException
- always. JSONLoader is unable to process a
data set incrementally.public String getRevision()
getRevision
in interface weka.core.RevisionHandler
public static void main(String[] args)
args
- should contain the name of an input file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |