🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"Failing to load Excel data using ExcelExampleSource"

User: "amogha_ec"
New Altair Community Member
Updated by Jocelyn
Hello all,
             Am trying to load Excel data and to create Example set objec but ending up with  exception.I am confused on how to use ExcelExampleSource.Am confused on how to configure xml file and some concepts like .aml format.Both my xml file and .xls file reside in c drive Excel folder
name of xls file is AirTickets.xls which contains some 35000 entries..I am executing the following code..
                       RapidMiner.init();
try
{
Operator operator=OperatorService.createOperator(ExcelExampleSource.class);
operator.setParameter("attributes", "C:\\Excel\\excelexamplesource.xml");
OperatorDescription operatordis = operator.getOperatorDescription();
ExcelExampleSource excelexamplesource=new ExcelExampleSource(operatordis);
System.out.println("excelexamplesource="+excelexamplesource);
ExampleSet exampleSet = excelexamplesource.createExampleSet();
Iterator<Example> iterator= exampleSet.iterator();
Example example=iterator.next();

}
catch (OperatorCreationException e)
{
e.printStackTrace();
}

and my excelexamplesource.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<operator name="excelexamplesource" class="com.rapidminer.operator.nio.ExcelExampleSource" >
<parameter key="attributes" value="C:\Excel\Air_Tickets.xls"/>
</operator>

The Exception is:

" java.lang.NullPointerException
     java.io.FileInputStream.<init>(FileInputStream.java:103)"

Anyone please help..Explain exactly how to load Excel data..
           

Find more posts tagged with