<%response.setHeader("Content-Disposition", "attachment;filename=paxsearchlist.xls"); %> The above" name="description">

JSP Excel report download for .xlsx format

Ads

 
 

Share on Google+Share on Google+

Aswini
JSP Excel report download for .xlsx format
1 Answer(s)      5 years and 9 months ago
Posted in : JSP-Servlet

<%@ page contentType="application/vnd.ms-excel" pageEncoding="ISO-8859-1"%> <%response.setHeader("Content-Disposition", "attachment;filename=paxsearchlist.xls"); %>

The above code works fine because i am trying to save/open excel file in .xls format but my requirement is to download excel with format .xlsx (m.S 2007),so i changed the code like this

<%@ page contentType="application/vnd.ms-excel" pageEncoding="ISO-8859-1"%> <%response.setHeader("Content-Disposition", "attachment;filename=paxsearchlist.xlsx"); %> The above code is giving error while save/opening file with format .xlsx. CAN you guide me in this. I am using 2007 M.S office in my machine where i am working with this issue.

Regards, Aswini N

Ads
View Answers

July 11, 2012 at 8:30 PM


I don't think you are issues still not resolved, but try this

page contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"


Ads









Related Tutorials/Questions & Answers:
JSP Excel report download for .xlsx format
JSP Excel report download for .xlsx format  <%@ page contentType...; The above code works fine because i am trying to save/open excel file in .xls format but my requirement is to download excel with format .xlsx (m.S 2007),so i changed
excel report fro jsp mysql
excel report fro jsp mysql  Dear Sir, I am facing some problem while generating excel report form mysql database using jsp code. With the help from your site, I can able to generate excel file for all data types other than blob
Advertisements
To save table format data in pdf/excel in jsp
To save table format data in pdf/excel in jsp  Hello, I am doing web application project in jsp. In webform ,I am displaying database data in html table. So my question is ,I want so save this html format data in pdf/excel format
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
how to connect xlsx(2007 excel) - JDBC
how to connect xlsx(2007 excel)  i am not able connect to office 2007 excel file from jdbc
Java code for conversion between .xls and .xlsx or vice versa - Development process
is developed using Servlets and JSP. My project allows clients to Upload / Download MS Excel sheets. The problem is I'm using MS Excel 2003 (.xls format) and clients may be using MS Excel 2007 / 2010 (.xlsx) format. I need a solution
report generation using jsp
report generation using jsp  report generation coding using jsp
Java xlsx - JSP-Servlet
Java xlsx  Dear Sir's / Madam's i want to read/write XLSX file... but not xlsx file.   Hi Friend, 1)Write .xlsx file: import java.io....); } } 2)Read .xlsx File: import java.io.*; import java.util.*; import
How to download files from server to local disk using ZIP format in JSP page - JSP-Servlet
How to download files from server to local disk using ZIP format in JSP page  hi i have an application to upload and download multiple files. As i can upload multiple files .now i have to download all uploaded files on local
jsp data in excel - JSP-Servlet
and this query data has come from beans and using beans i put it in excel jsp in table...jsp data in excel  i have create jsp page which has button for excel.this calls jsp which contains code which has and then code for present data
Read Excel(.xlsx) document using Apache POI
Read Excel(.xlsx) document using Apache POI In this section, you will learn how to read Excel file having .xlsx extension using Apache POI library. In the below example, we will read excel document having one sheet named as "new
Create Excel(.xlsx) document using Apache POI
Create Excel(.xlsx) document using Apache POI In this section, you will learn how to create a Excel sheet having .xlsx extension using Apache POI library. In the given below example, we will going to create excel document having one
JSP TO EXCEL
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
JSP to Excel - JSP-Servlet
JSP to Excel  Need an example of JSP and Excel database connection. Thanks
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
export to excel - JSP-Servlet
export to excel  Hi this is priti. I need a help. What is my question is i have a report page here i need a button cllaed "Export to excel". After clicking the button all the values from the jsp page will save to a excel file
how to convert a .xlsx to .xls fil - JSP-Servlet
how to convert a .xlsx to .xls fil  Dear sir, How to convert a .xlsx file to .xls using poi .Please give me some clue.... Thanks in advance
To create crystal report in JSP using neatbeans
To create crystal report in JSP using neatbeans  How to create crystal report in JSP using neatbeans 6.9.1.
jsp excel code - JSP-Servlet
jsp excel code  hi how to store html form data into excel sheet by using jsp? and repeat this process continuously for entire sheet
generate graf report.. - JSP-Interview Questions
generate graf report..  How to generate report(graf) using jsp code
jsp - excel generating problem - JSP-Servlet
jsp - excel generating problem  Hi, I worked with the creating excel through jsp, which is the first example in this tutorial (generateExcelSheet.jsp). while running the program, the excel sheet is opening in download mode
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
Upload and Download in JSP - JSP-Servlet
Upload and Download in JSP  Respected Sir/Madam, I am... and downloading a file in JSP.. When the admin clicks upload, he must be able to upload files and similarly when the user clicks the download option, he must be able
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
jsp excel code - JSP-Servlet
jsp excel code  Hi how to insert form data into excel file using jsp?  Hi Friend, Try the following code: 1)register.jsp: Registration Form First Name: Last Name: User Name: Password
Built in Data Format in Excel Using POI 3.0
Built in Data Format in Excel Using POI 3.0  ... in format for formatting our data in excel sheet.  POI version 3.0 provides... OLE 2 Compound Document format using Java .POI version 3.0 APIs provides
Set Data Format in Excel Using POI 3.0
Set Data Format in Excel Using POI 3.0       In this program we are setting data format in excel... various file formats based upon Microsoft's OLE 2 Compound Document format using
download or save jsp page
download or save jsp page  hii.., this is my jsp page .. This page is theater ticket. i want to download this page. so i need to save this page or download.. that depend on user wish how to make this page save or download <
download or save jsp page
download or save jsp page  hii.., this is my jsp page .. This page is theater ticket. i want to download this page. so i need to save this page or download.. that depend on user wish how to make this page save or download <
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
Download file - JSP-Servlet
Servlet download file from server  I am looking for a Servlet download file example

Ads

 
Advertisement null

Ads