Read Excel File using MapReduce

The below code is used for reading excel files using MapReduce API.

Entire source code has been taken from this link.

 

ExcelDriver.java

ExcelInputFormat.java

ExcelMapper.java

ExcelParser.java

ExcelRecordReader.java

pom.xml

If you clean and build above project, it will create two jar files, out of which we have to use the jar file with dependencies.

I have used following command in order to run this mapreduce job.

hadoop jar mr-excel-jar-with-dependencies.jar /test.xls /mec

Following screenshot indicates test.xls contents

Input File
Input Excel File for MapReduce job

 

Following screenshot will give you idea about output part file.

Output File
MapReduce Output File

 

Thanks for having the read.

Do comment if you have any concerns.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s