George,

I have done this and it works quite successfully.

I use XSLT to transform the XML into both tab delimited and csv format
amongst others then in combination with cfcontent I allow the user to
"export/save" the data in their desired format.

The XML document is built up at the same time as it is being displayed
in HTML e.g. 

In your <cfloop>

<cfloop>
        <td>#column1#</td>
        <cfset
xmlDoc.xmlRoot.xmlChildren[rowIndex].xmlChildren[i].xmlText = column1>
</cfloop>

You could of course generate the HTML/Report output using XSL too but I
found it more efficient to generate the HTML and XML document
concurrently because the HTML view will always be seen before the user
optionally exports it to another format.

André

-----Original Message-----
From: Earl, George [mailto:[EMAIL PROTECTED] 
Sent: 04 September 2003 18:23
To: CF-Talk
Subject: Massaged query output to Excel file (was query output to Excel
fi le)

Petr said:
> What would you say is the best way of creating an Excel file 
> from query
> data?
> I don't need to know how to create a .csv file.

Different but similar. I need to create an Excel file (or a CSV file, or
a
tab delimited file, or a print file) from query output that has been
massaged into reports that are already displaying on the screen (i.e.,
save
the displayed report output to Excel, CSV, tab delimited or print). We
have
a guy on our team looking into saving the formatted query output to xml
from
which we would then generate any of the other formats. Has anyone tried
this? Does anyone have other ideas on how to do this?

George
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to