Another way to generate Excel is to post tab-delimited text to a server
side page that sets the proper headers and sends the text right back.
Here's a JSP example:
<%
response.setContentType("application/ms-excel");
response.setHeader ("Content-Disposition", "attachment;
filename=\"myExcel.xls\"");
ServletOutputStream outstream = response.getOutputStream();
String data = request.getParameter("data");
if (data != null) {
byte[] b = data.getBytes();
outstream.write(b, 0, b.length);
}
%>
Posting ASCII text such as "First Name\tLast Name\r\nJoe\tSmith" for the
data parameter will give you a nice Excel spreadsheet. I use something
similar to allow dataGrid contents to be exported to Excel and other
formats.
Doug
--- In [email protected], "Steve Gustafson" <[EMAIL PROTECTED]>
wrote:
>
> The Time Tracker application is not really exporting to excel. it is
just
> saving HTML with a .xls extension.
>
> ColdFusion does not have a native way of generating true Excel files
either.
>
> As far as I know, the two ways to create native excel files on the
server
> side is using COM, or POI-HSSF.
>
> POI-HSSF is part of the Apache-Jakarta project, open source, and plays
> nicely with ColdFusion MX or any other J2EE server.
> Check it out here: POI-HSSF
<http://jakarta.apache.org/poi/hssf/index.html>
>
> Gus
>
>
> On 6/12/06, vestcomprogrammer [EMAIL PROTECTED] wrote:
> >
> > Does anyone know how to export to excel, like they do on the
> > timetracker application on the showcase page on
> > http://labs.adobe.com/showcase/.
> >
> > Thanks
> > Bill
> >
> >
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/