public class ExcelLoader
extends weka.core.converters.AbstractFileLoader
implements weka.core.converters.BatchConverter, weka.core.converters.URLSourcedLoader, weka.core.OptionHandler
-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 Form| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_DESCRIPTION
the file description.
|
static String |
FILE_EXTENSION
the binary file extension.
|
static String |
FILE_EXTENSION_OOXML
the OOXML file extension.
|
| Constructor and Description |
|---|
ExcelLoader() |
| Modifier and Type | Method and Description |
|---|---|
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<weka.core.Option> |
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.
|
public static String FILE_EXTENSION
public static String FILE_EXTENSION_OOXML
public static String FILE_DESCRIPTION
public String globalInfo()
public Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlerpublic 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.OptionHandleroptions - the options to useException - 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.FileSourcedConverterpublic String[] getFileExtensions()
getFileExtensions in interface weka.core.converters.FileSourcedConverterpublic String getFileDescription()
getFileDescription in interface weka.core.converters.FileSourcedConverterpublic void reset()
throws IOException
reset in interface weka.core.converters.Loaderreset in class weka.core.converters.AbstractFileLoaderIOException - 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.URLSourcedLoaderurl - the url to load fromIOException - if the url can't be set.public String retrieveURL()
retrieveURL in interface weka.core.converters.URLSourcedLoaderpublic void setSource(InputStream in) throws IOException
setSource in interface weka.core.converters.LoadersetSource in class weka.core.converters.AbstractLoaderin - the source InputStream.IOException - if initialization of reader fails.public weka.core.Instances getStructure()
throws IOException
getStructure in interface weka.core.converters.LoadergetStructure in class weka.core.converters.AbstractLoaderIOException - if an error occurspublic weka.core.Instances getDataSet()
throws IOException
getDataSet in interface weka.core.converters.LoadergetDataSet in class weka.core.converters.AbstractLoaderIOException - if there is no source or parsing failspublic weka.core.Instance getNextInstance(weka.core.Instances structure)
throws IOException
getNextInstance in interface weka.core.converters.LoadergetNextInstance in class weka.core.converters.AbstractLoaderstructure - ignoredIOException - always. JSONLoader is unable to process a data set
incrementally.public String getRevision()
getRevision in interface weka.core.RevisionHandlerpublic static void main(String[] args)
args - should contain the name of an input file.Copyright © 2015 University of Waikato, Hamilton, NZ. All Rights Reserved.