Reading and Writing data to excel file using Apache POI

Refer to the below Links for Practise
Collections in Java
Complete List of Selenium Basics
50 Real Time Interview Questions
Real Time Scenario’s
Java Platform Standard Edition 8 Documentation
Complete List of Java Basics
Java Quiz
Java OOPS Quiz
Selenium Advanced Quiz
Selenium Quiz
Selenium WebDriver Resume

What is Apache POI?
Apache POI is a popular API that allows programmers to create, modify, and display MS Office files using Java programs. It is an open source library developed and distributed by Apache Software Foundation to design or modify Microsoft Office files using Java program. It contains classes and methods to decode the user input data or a file into MS Office documents.

• HSSF (Horrible Spreadsheet Format) : It is used to read and write xls format of MS-Excel files.
• XSSF (XML Spreadsheet Format) : It is used for xlsx file format of MS-Excel.

Step 1 Download the apache poi jar file as below
Access the below link for Downloading the Apache POI.
http://poi.apache.org/download.html

Step 2Click on the Latest Binary Distribution zip file to download.

Apache POI[Poor Obfuscation Implementation File System]

Apache POI[Poor Obfuscation Implementation File System]

Latest Binary of Apache POI for Reading XLSX

Latest Binary of Apache POI for Reading XLSX


Step 3 Add the Highlighted Jars to the project build path.
Apache POI Jars are added to the build path.

Apache POI Jars are added to the build path.


ooxml-lib jars added to the project

ooxml-lib jars added to the project


Program: Reading xlsx using Apache POI (“Poor Obfuscation Implementation”)

Utility Methods-loadXLSX(),writeCellData()

Program: Reading xls using Apache POI (“Poor Obfuscation Implementation”)

Leave a Reply

Your email address will not be published. Required fields are marked *