It should be mentioned that IE as a browser will store the downloaded 
file on disk in its cache system ("temporary internet files") before it 
opens it. This is the case regardless of content disposition. Other 
browsers will behave similar.

If it is important that the file is never resident on disc, this may be 
important.

If it is only important to unburden the user from the decision and 
effort to store the file somewhere and reopen it manually, the solution 
given should be sufficient.

Another possible way may be utilizing things like DDE (still alive or 
already dead?) or OLE or whatever MS uses for IPC currently. But then 
the Java application will have to make use of these Windows-specific 
features which may be quite untrivial. ;-)

--cg

> -----Original Message-----
> From: David Fisher [mailto:[email protected]]
> Sent: Wednesday, August 05, 2009 6:11 PM
> To: POI Users List
> Subject: Re: Write data in unsaved Ecxel File...
> 
> Hi,
> 
> There is one way you could get this effect - at least this worked
> several years ago. If you have your POI application as part of a web
> servlet container like Tomcat, then you can serve up the Excel file
> that you create in memory - write the response output stream. The
> trick is that you will use a content-disposition of "inline" then
> assuming the user is using IE and has not changed the default behavior
> the Excel file should open in Excel in an IE window. The user should
> then be able to save the file, or not.
> 
> Look in the email archives for a servlet container piece I posted
> recently.
> 
> Good luck.
> 
> Regards,
> Dave
> 
> On Aug 5, 2009, at 2:06 AM, Dreamcatcher wrote:
> 
> >
> > Hi Guyz..
> >
> > I am using Apache POI in my project. I want to export the data from
> > data
> > Table to an EXCEL FILE, thanks to apache POI library through which i
> > got
> > success in that task. But now the problem is that i want such excel
> > file
> > which doesnt exist i.e. which is not be saved on my hard drive,
> > Inshort i
> > just want to write data in an Unsaved Excel file in such a way that
> > whenever
> > user clicks the menu of Export To Excel an Excel Sheet gets opened
> > with no
> > name and with no path over my hardrive but should contains the data
> > of that
> > particular data Table.....
> >
> > I would be very grateful to you guyz for any sort of help...
> >
> > Regards:
> > Dreamcatcher....
> > --
> > View this message in context: http://www.nabble.com/Write-data-in-
> unsaved-Ecxel-File...-tp24823324p24823324.html
> > Sent from the POI - User mailing list archive at Nabble.com.
> >
> >
> > 
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> !DSPAM:4a79af58326665510920803!
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to