View Answers

October 7, 2008 at 10:49 AM

Hi friend,

Code to data from Jsp to excel sheet.


<%@ page language="java" import="java.io.*" %>
<form method="post" action="success.jsp">
<p><font color="#800000" size="5">Enter XLS file name:</font>
<input type="text" name="username" size="20"></p>
<input type="password" name="password" size="20"></p>
<input type="text" name="first_name" size="20"></p>
<input type="text" name="last_name" size="20"></p>
<p><input type="submit" value="Create"

<%@ page import="org.apache.poi.hssf.usermodel.HSSFSheet"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFWorkbook"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFCell"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFRow"%>
<%@ page import="java.io.*" %>
String username=request.getParameter("username");
String password=request.getParameter("password");
String first_name=request.getParameter("first_name");
String last_name=request.getParameter("last_name");

HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
HSSFRow row = sheet.createRow((short)0);
HSSFCell cell = row.createCell((short)0);
FileOutputStream fileOut = new FileOutputStream("c:\\"new".xls");
}catch ( Exception ex ){

For more information on excel sheet Using JSP visit to :




Related Tutorials/Questions & Answers:
excel  how to read columns values of excel file in java and store in array list in java like col1 col2 2 3 1 7 7 9 then list1 have values of col1 and list2 have values of col2...  
excel  how to save excel sheet data into the database using poi api?   import java.io.*; import java.sql.*; import java.util.*; import java.util.regex.*; import org.apache.poi.hssf.usermodel.
JDBC to EXcel
JDBC to EXcel  How to insert data in excel sheet from java
Excel to database
Excel to database  Hi I want to update SQL database with the values from excel using java code. Can you help me
JAVA EXCEL  How to read the contents of an excel, perform some calculation and wrote the calculated values to another excel using poi
download excel
download excel  hi i create an excel file but i don't i know how to give download link to that excel file please give me any code or steps to give download link
JAVA_EXCEL  I need to read the all the contents of excel which has... content another excel. For example if I have three tabs in an excel with some contents... to another excel. Please help me out with this problem
Sql to excel
Sql to excel  How to convert a Sql Data into excel Doc with Using Netbeans
JSP TO EXCEL  Hi sir/mam, How to import data to excel using jsp without retrieving database.   friend, you can't import excel data into the middle of an HTML pages (your JSP will result in an HTML page
To Generate Excel
With EXCEL in it has to open up how can i achieve this pls explain
convert excel into pdf
convert excel into pdf  How to convert excel into pdf files
uploading and reading the excel daa
uploading and reading the excel daa  uploading the excel file not getting the data of the excel
excel to database
excel to database   How to export data from excel sheet to mysql database by using java with request parameter Here q=40 is a request parameter ..request parameter using i export the all data to database   <
Excel Column change
Excel Column change  How to change sequence of columns in Excel sheet through Java
struts2 excel downloads
struts2 excel downloads  hi friend, how to set Timestamps(Date+time) values to excel sheet cells
How to Unlock Excel Password
How to Unlock Excel Password  anyone help me how to recover lost Excel file password
JSP to Excel - JSP-Servlet
JSP to Excel  Need an example of JSP and Excel database connection. Thanks
VB and excel - Development process
VB and excel  Hello sir, I want to create an excel sheet in VB 6.0 and get the data from Excel to MS-Access and set the macro in MS-Access for the Excel sheet data. Data contain in Excel Sheet to display in MS-Access and set
how to use Excel Templet to write excel file using java.
how to use Excel Templet to write excel file using java.  how to use Excel Templet to write excel file using java
jsp to excel - JSP-Servlet
jsp to excel  Hi All, I'm writing a program of jsp to Excel conversion with Using POI. My problem is i'm unable to put multiple data into excel...)); } FileOutputStream fileOut = new FileOutputStream("c:\\excel\\wct.xls
struts2 excel downloads
struts2 excel downloads  hi sir, am new to the real time environment. am going to create excel sheet and setting values to excel sheet from db table dynamically by using Hibernate persistence logic.......am using struts2
Excel Password Cracker Software
Excel Password Cracker Software  Hello I just want to know what is Excel Password Recovery software? I want need to recover a worksheet since I forgotten
excel uploading in jsp
excel uploading in jsp  could you provide the source code for: 1)have to upload an empty excel sheet at client side i.e if client clicks an excel icon an empty excel sheet should open 2)when they fill data in that sheet and click
currency symbols in excel
currency symbols in excel  How to add a currency symbol in Excel sheet? Please guide me
Export html data to excel
Export html data to excel  I am trying to export data from an html page to an excel sheet.Any advise
how to use Excel Template to write excel file using java
how to use Excel Template to write excel file using java  How to use Excel template to write data in that file using java
connect jdbc to an Excel spreadsheet
connect jdbc to an Excel spreadsheet  hello, How can I connect to an Excel spreadsheet file using jdbc?   Hello Friend, Follow... Excel Driver(*.xls) Select work book or excel file and Create the DSN name (e.g
Reading an excel file into array
Reading an excel file into array  Hi, I'm trying to read in an excel file, search a column for containing key words (entered by a user) and then displaying the matching rows in a table. I'm fairly new to JavaScript. Can anyone
Excel - JSP-Servlet
Excel  How to export data from jsp to excel sheet. I am using struts1.2 in my application.  Hi friend, Code to data from Jsp to excel...: "success.jsp" For more information on excel sheet Using JSP visit
excel to ms access
excel to ms access  hello sir i am developing a application which requires extracting data from excel sheet and place in the ms access database using java programming for example: in excel sheet i have 2 columns and more than
How to export grid into excel
How to export grid into excel  Hi, i created a grid panel i have to export it to the excel. please help me by some sample code. thanks in advance. cool day dude