how to display the output of the newly created excel file

how to display the output of the newly created excel file

the following program will create the test.xlsx file, how can i display the content of the test.xlsx file in the web browser?

thanks,

%@ page import="java.io.InputStream" %>
<%@ page import="org.apache.poi.xssf.usermodel.XSSFSheet"%>
<%@ page import="org.apache.poi.xssf.usermodel.XSSFWorkbook"%>
<%@ page contentType="application/vnd.ms-excel" %>
<%@ page import="java.io.*" %>
<%
        try {
           XSSFWorkbook wb = new XSSFWorkbook();
    XSSFSheet sheet1 = wb.createSheet("TwA");
    XSSFSheet sheet2 = wb.createSheet("TwM");
   XSSFSheet sheet3 = wb.createSheet("XwFA");
    XSSFSheet sheet4 = wb.createSheet("OTHERS");

    FileOutputStream fileOut = new FileOutputStream
("c:\\excel\\test.xlsx");
    wb.write(fileOut);
    fileOut.close();    

        } catch ( Exception ex ) {

        } 
%> 
View Answers

May 19, 2011 at 11:48 AM

Have a look at the following link:

Visit Here









Related Tutorials/Questions & Answers:
how to display the output of the newly created excel file
how to display the output of the newly created excel file  the following program will create the test.xlsx file, how can i display the content of the test.xlsx file in the web browser? thanks, %@ page import
how to display the excel file content in the jsp
how to display the excel file content in the jsp  How to present the content of the newly created excel file in the following jsp to the web browser...="application/vnd.ms-excel" %> <%@ page import="java.io.*" %> <
Advertisements
how to display the excel file in the web browser.
how to display the excel file in the web browser.  > %@ page.../vnd.ms-excel" > %> <%@ page import="java.io.*" %> <% >... FileOutputStream > ("c:\\excel\\aqtemplate.xlsx"); > wb.write
how to display data in excel sheet?
how to display data in excel sheet?  According to the user Id,some... will be displayed in excel sheet.can you people please help me how to create the button and to display the data in excel sheet
How to Read Excel file Using Java
How to Read Excel file In this section,you will learn how to read excel file... and every cell and stored the excel file values into the vector.This Vector data is then used to display file values on the console. Here is the code
write a program in java to read a text file and write the output to an excel file using filereader and filewriter?
write a program in java to read a text file and write the output to an excel file using filereader and filewriter?  write a program in java to read a text file and write the output to an excel file using filereader and filewriter
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
how to display the data from excel to webpage
how to display the data from excel to webpage  Hi, I need help... search for the value 4024 in a excel file and to display the remaining values... that reads the excel file and store data into table. <%@page import="java.io.*"%>
how to display pdf file on browser
how to display pdf file on browser   In my project i have created one pdf file(by pdfwriter) into my local mechine . after that it need to display in browser as a pdf file . but in jsp i can't display by iframe tag can anyone
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
Access Excel file through JDBC
Access Excel file through JDBC In this section, you will learn how to access excel file through Jdbc and display records in JTable. As you know Excel comes... and the excel file. Here the name of the worksheet is equivalent to any database
How to display a file for 24 hours?
How to display a file for 24 hours?  How to display a file for 24 hours
how to create an excel file using java
how to create an excel file using java  how to create an excel file using java
how to insert excel file into mysql datbase in servlet
how to insert excel file into mysql datbase in servlet  emphashow to insert excel file into mysql datbase inservletized text
How to delete excel file records using Store Procedure?
How to delete excel file records using Store Procedure?  Hi.. I have created one Excel file through stored procedure.Now I want to delete records or delete excel file. Thanks
How to insert rows from Excel spreadsheet into database by browsing the excel file?
the excel file using file browsing dialogue through form in JSP. How can i select...How to insert rows from Excel spreadsheet into database by browsing the excel file?  I want to insert rows from excel sheet to database.for this i
Excel Created using POI and HSSF - Development process
Excel Created using POI and HSSF  Hi i ceated excel file using jakarta poi library i want to add Percentage formula to cell i am not able to do that can you please suggest me how do i add formula c3.setCellValue("Percentage
Fetching data from excel file on other website and display in interactive graph form
Fetching data from excel file on other website and display in interactive graph... tell me how will it be possible? Do I need java script? I have a website which have zip files and excel files and they get updated everyday, so how can i
How to upload a large excel file - JSP-Servlet
How to upload a large excel file   Dear sir , How to upload a large excel file and how to read a that large excel file or how to get a each column values from that large excel file.For small file i am getting values
retrieving newly added records from mssql database and display in a jsp
retrieving newly added records from mssql database and display in a jsp ... from mssql database table and display those records in a jsp.And i have to delete... from the table and display in jsp and so on.This should be done forever(here we
how can i display a pdf file in a jtextarea
how can i display a pdf file in a jtextarea  I need to display a pdf file in a jtextfield or in a jtextarea.Atlest i need to displat it in a jframe.I have a button and while clicking on it ,i need to choose the pdf file and need
how to display csv file directly in IE browser .
how to display csv file directly in IE browser .  here is my code : public String download(){ if(log.isDebugEnabled()){ log.info... open directly in excel file but not in IE . I am using IE 8 with windows 7
How to Display jrxml file on JSP page???
How to Display jrxml file on JSP page???  I made jrxml file using jasper report but how to display on jsp page?? i tried lot but still i didnt find out solution.so pls help me as soon as possible
Insert data in Excel File from Database using JSP
into newly generated excel file. Steps to create an excel file... Insert data in Excel File from Database  using JSP ... developed a application to insert data  in excel file from database in JSP. We
how to sort the text file and display it in jtable
how to sort the text file and display it in jtable   my text file is: contig00001 length=586 numreads=4... ctgaggactcctcg i want to display the lines started with ">" symbol to be displayed
How to browse excel file and stored the contents into the database using jsp/servlet?
How to browse excel file and stored the contents into the database using jsp/servlet?  Hi.. I want to browse excel file and stored the file data into the My-sql database using jsp/servlet
How to export data from html file to excel sheet by using java
How to export data from html file to excel sheet by using java    How to export data from html file to excel sheet by using java
Exporting to excel using display tag?
Exporting to excel using display tag?  Hai , I am implementing pagination in struts.It has export to excel option.When I am clicking on it ,it is displaying a alert box stating "the file you are trying to open
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??  How to import data from sql server table into an excel file by creating the rows dynamically
Java Redirect output to file
Java Redirect output to file This section illustrates you how to redirect the output to the file. It may be comfortable to a programmer if they are able... to the file. In the given example, we have set the output stream of System
How to open excel sheet when excel file is placed in some folder in desktop
How to open excel sheet when excel file is placed in some folder in desktop  How to open an excel sheet using windows.open in IE... I am getting an error msg that the path is not correct.. But i have specified the correct path
How to export data from html file to excel sheet by using java
How to export data from html file to excel sheet by using java   reading the data from Html file
How to convert excel file int xml format in java
How to convert excel file int xml format in java  How to read excel file(xls) which is stored in any directory(D://) and convert it into xml format in java and place in any directory(E://).Can any body provide the code
How to Retrieve Data from the database and write into excel file using Java
How to Retrieve Data from the database and write into excel file using Java  Hi, I am trying to develop an small application where i trying to retrieve Data from the database and store the details in excel file. Please can
how to display data from jsp file into database
how to display data from jsp file into database  this is a jsp file . look at the line with code-> Statement st=con.createStatement(); in the below example. the error is "cannot convert from java.sql.Statement
sir, how to convert excel file to csv file using java? please send me sample code.
sir, how to convert excel file to csv file using java? please send me sample code.  please send me sample code for converting excel file into csv file uisng java
How to retrieve file name and path of an excel spreadsheet imported into Oracle Database
How to retrieve file name and path of an excel spreadsheet imported into Oracle Database  I imported an excel spreadsheet using sql developer into my Oracle database and I want to know how to retrieve the path of the file
How to link a excel file with a application software using java swing
How to link a excel file with a application software using java swing  I have to link an excel file with a application software which I am developing.The excel file will contain questionnaire for surveys.I have this code which
How to link a excel file with a application software using java swing
How to link a excel file with a application software using java swing  I have to link an excel file with a application software which I am developing.The excel file will contain questionnaire for surveys.I have this code which
How to link an excel file with the application software using java swing
How to link an excel file with the application software using java swing  I have to link an excel file with a application software which I am developing.The excel file will contain questionnaire for surveys.I have this code which
How to save run time created text-file on a disk using jsp/servlet?
How to save run time created text-file on a disk using jsp/servlet?  I have a JSP page with save button.In that I created the file(e.g a.txt) at run-time,when I click on the save button,it will ask where to save the file
how to present the excel to the web browser in jsp
how to present the excel to the web browser in jsp  How to present the content of the newly created excel file in the following jsp to the web...="org.apache.poi.xssf.usermodel.XSSFWorkbook"%> <%@ page contentType="application/vnd.ms-excel
How to add download option for openwith and saveAs on exporting file to excel in servlet
How to add download option for openwith and saveAs on exporting file to excel... for generated .excel file to save at particular position on the system.Now as per...(); System.out.println("Your excel file has been generated!"); } catch
How to add download option for openwith and saveAs on exporting file to excel in servlet
How to add download option for openwith and saveAs on exporting file to excel... for generated .excel file to save at particular position on the system.Now as per...(); System.out.println("Your excel file has been generated!"); } catch
importing excel file
importing excel file  Hi All I am developing a java application whre we upload a excel file in to database and all excel value should import...(); } } } but it showing following output: org.apache.poi.hssf.usermodel.HSSFCell@bfc8e0
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 file Handling in Java
Excel file Handling in Java  Hello Sir, I am new to Java, I have Started Java Core by myself. I want to make a project which include 3-4 Excel file to handle.Please explain how to read and write Excel file in Java.Is it tough
create table in mysql of split file created in java
create table in mysql of split file created in java  i have created splite file in java. now i want to create table from splited data how to do
Java Display File-Extension
Java Display File-Extension       In this program you will learn how to display the file extension of the file. Here you will be asked to enter the file name
How display a image on servlet from file upload - JSP-Servlet
How display a image on servlet from file upload   Dear Sir, My Question is: How display a image on servlet from file upload Your Answer: Hi... that an attempt to open the file denoted by a specified pathname has failed

Ads