In this program, we are going to read and write the excel sheet using java .
The package we need to import is :
org.apache.poi.poif.filesystem.POIFileSystem class is used to buffer the excel file into an object. In other words, we can say that it is used to read the excel file. After reading the excel file we use write() method to write into any excel file.
We can read any file and write it into other excel file by this way. You can add new cell and rows or you can set any default values for any cells. This means you can read excel file and modify it according to your need.
To run this example you have to download the excel
file and code first then make folder with the name of excel in C drive then copy the
excel file and copy the code into webapps then follow the steps as defined in previous
The code of the program is given below:
The output of the program is given below:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial