In this example we create excel sheet and insert
values into table of the excel sheet .
In this example we use page directive and set the contentType="application/vnd.ms-excel". The purpose of this to set this contenType is to display the output in excel format.
<%@ page contentType="application/vnd.ms-excel" %> :
Here, we insert the data into table. The data will display into tabular format in excel sheet. You can also use third party API for creating a excel sheet in JSP. You will learn more about the procedure of using the third party APIs in the next section that has been provided by Jakarta Apache Foundation Group.
The code of the program is given below:
The output of the program is given below:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: May 19, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles