More to the point, why not just set your Content-type:
to application/vnd.ms-excel? That will cause the user's browser
to open Excel as a plugin and import the servlet output data directly
into it, without any messy intermediate file saves and imports
into the final target app...T
P.S. The use of the word "servlet" in the previous sentence
was entirely gratuitous and meant only to appease the protocol
police ;)~
----- Original Message -----
From: "Michael Weller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 1:56 PM
Subject: Re: Saving into File
> ----- Original Message -----
> From: "Krishnamurthy, Balaji" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 27, 2001 7:35 PM
> Subject: Re: Saving into File
>
>
> > Chris:
> >
> > Here is my actual problem...
> >
> > I have a servlet that accepts some input criteria (e.g. department
name),
> > execute a query in the database and print the result in tabular format.
> >
> > Now we want the ability to save the table in excel format. There are few
> > ways to do this. One approach is to save the file in the server side
(i.e.
> > after executing the query, generate the excel file and store them in the
> > server. When the user request to save the table as excel, download the
> file
> > from server) and provide an URL for the same. The issue is we generate
too
> > many such files, so there are disk space issues associated with it. Not
to
> > mention the overhead of maintaining additional purge process etc.
>
> you didn't read my suggestion, did you? instead of saving the file on the
> server and providing a link to that file to enable the download, directly
> print out the file, set the content type so that the user can download the
> file.
>
> >
> > Thanks
> > Balaji
> >
>
> cheers!
>
> -mw
>
> >
> > -----Original Message-----
> > From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 27, 2001 11:59 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Saving into File
> >
> >
> > "Krishnamurthy, Balaji" wrote:
> > >
> > > Is there any way we can save the return value of a
> > > Javascript function into a file. For e.g.
> > >
> >
> > This is the 'servlet-interest' list. As you might have
> > guessed from the name, it's reserved for questions that
> > have something to do with servlets. You question has
> > nothing to do with servlets, so it's inappropriate for
> > this forumn. It's considered impolite to ask off topic
> > questions.
> >
> > You might check google:
> >
> > http://www.google.com
> >
> > it's a search engine that's very good for finding
> > answers to programming-related questions. There are
> > literally thousands of faq's, sites, mailing lists and
> > books dealing with javascript. A google search will
> > turn up many of them.
> >
> > Good luck, and thanks for helping to keep servlet
> > interest a clean, fast and efficient place to talk
> > about servlets.
> >
> >
> > -cks
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html