• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get rid of opening extra Excel window in JSP  RSS feed

 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody,
Could anybody suggest me some solution for my problem decribed below
I have one JSP application, which writes to MS Excel file, and display it into browser.
The sample code to do this is here…
---------- CODE STARTS HERE----------
<%@ page import="com.f1j.swing.JBook" %>
<%@ page import="com.f1j.ss.*" %>
<%
try
{
com.f1j.swing.JBook f1 = new com.f1j.swing.JBook();
f1.setText(0, 3, "My Sample Excel Application");
response.setContentType("application/vnd.ms-excel");
f1.write(response.getOutputStream(), new com.f1j.ss.WriteParams(f1.eFileExcel97));

}catch(Exception e)
{
e.printStackTrace();
}

%>
---------- CODE ENDS HERE----------
This code work as expected. The problem is that it opens an extra excel window. I want to get rid of this. I want to display data on Excel without opening other extra Excel window.
Can anybody help me to sort out this problem?
Thanks
Himanshu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!