• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Excel File Download

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI all,

I am generating excel reports in weblogic server 7.0 using servlets and I use JCOM for this.
The code is like this ...

code :
import http.servlet.*;
..
public class servlet name extends ..
//DB connection
Connection con = null;


//JCOM or Jintegra code
Cleaner.trackObjectsInCurrentThread();
excel.Application app = new excel.Application();
excel.Workbooks workbooks = app.getWorkbooks();

//download part
response.setHeader("Content-Disposition","attachment; filename=\""+ new String(fileJa.getBytes("Shift_Jis"),"ISO8859_1") + ".xls\"");
response.setHeader("Content-Description","super ");
response.setHeader("Pragma","Public");

}


Here when I click generate reports i can download excel file by answering an dialog box whether to "save" or "open".

My prob is when i do not answer an dialog box in one machine and keep the box as it is, I am not able to further proceed to generate report in other machines.

How could I rectify this problem... Some times i could get reports generated when not answered.

Thanx

Vinod
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
you can user jspSmartUpload down Excel files.
code:
*begin
import="com.jspsmart.upload.*"
SmartUpload su = new SmartUpload();
su.initialize(pageContext);
su.setContentDisposition(null);
su.downloadFile("/upload/myfile.doc");
*end
i think you can do well.
bye.
leehonw
 
reply
    Bookmark Topic Watch Topic
  • New Topic