Excel (xls) Automation

Now it is time to look at automation code to manipulate XL sheets

1.      Download the following jars:
a.      poi-3.15 jar
b.      poi-ooxml-3.15 jar

2.      Load the jar files into the project.

3.      Import these:
            a.      import org.apache.poi.ss.usermodel.*;
      b.      import org.apache.poi.hssf.usermodel.*;

4.      Now time to try to write the code. Below is the list of different methods used to manipulate data:

a.       To read xls workbook

b.      To get row count in the sheet    


d.      To get the cell data          

e.       To create a new workbook         


            

5.      POI API documentation can be found here.

No comments:

Post a Comment