Skip to main content

Posts

Showing posts from August, 2019

Read Excel with Java

Happy Automation! How to do in plain Java and POI  We use Apache POI library for reading an excel file. To read a any excel file we required lots of steps. 1. Open a file 2. Create an object of workbook 3. Get a sheet 4. Get rows using loop 5. Get cells using nested loop. But there is an easy way called exclim .  How to use Link to  exclim < dependency > < groupId >com.github.sukhjindersukh</ groupId > < artifactId >Exlim</ artifactId > < version >1.1</ version > </ dependency > Suppose we have Employee sheet in some excel file with following columns Name DOB Employee_1 25-05-1989 Employee_2 15-02-1980 Employee_3 02-05-2000 Now read all data in java 1. Create a simple java class as below public class Employee { String Name , DOB ; public String getName () { return Name ; } public void setName ( String name ) { ...