If you're running an NT server, you can use COM. See http://www.infozoom.de.


-----Original Message-----
From: Heath Chiavettone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 8:17 PM
To: 'Struts Users Mailing List'
Subject: RE: How to Generate .xls file from struts app.


We did this in our application and we found out just how limited Excel's
HTML conversion capability is.  It doesn't understand stylesheet styles, it
sometimes blows up if images are referenced in the html, etc...

We are looking into POI as a solution.

-----Original Message-----
From: Gruner, Manfred [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 2:50 AM
To: 'Struts Users Mailing List'
Subject: RE: How to Generate .xls file from struts app.

Hi,
you don't have to generate csv-files take the html-Code itself,
and change the mime type to "application/vnd.ms-excel".
This should work too.
Manfred

> -----Original Message-----
> From: Jim Crossley [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 4:34 PM
> To: Struts Users Mailing List
> Subject: Re: How to Generate .xls file from struts app.
>
>
> "gvn" <[EMAIL PROTECTED]> writes:
> >
> > I would like to generate a .xls (excel) file data from a result set.
> > =20
> > What I have to do ?=20
>
> One simple approach is to generate a CSV (Comma-Separated-Values) file
> instead, and then set the response's content type to
> "application/vnd.ms-excel".  That way, you exploit the fact that Excel
> transparently handles CSV files and rely on the browser to invoke
> Excel.
>
> Your action amounts to something not quite as trivial as this:
>
>   PrintWriter out = response.getWriter();
>   while (youHaveRows)
>     while (youHaveColumns)
>       out.print(yourCell+",");
>   out.close();
>   response.setContentType("application/vnd.ms-excel");
>
> --
> Jim Crossley
> http://www.lads.com/~jim
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to