I just ran into this myself and heres what I came up with. The problem was
with CFCOntent and NT SP6 and 6a.
I hope can help someone...
<!---
Sorry about the bad word but no one will see it but us
Created by Jesse 'KingJes' Kilgore 06/05/00 with the help of
mastering CF 4.5 and some news groups...SWEET!
--->
<!---
This is grabbing all the current user Info from the CMT dB
I could add stuff to make the query better like adding some where
clauses ect
to run the query based on what the user is looking for i.e.
#form.whatever# ect
--->
<CFQUERY NAME="GetMyShit" DATASOURCE="CMT">
SELECT AdviserName, AdviserAspect, CoachName
FROM UserInfo
</CFQUERY>
<!---
This is writing the file to d:\temp on castle_weba so later I can
grab it and open it in .xsl with out useing the
CF Content tag which is hosed with SP 6 for NT
--->
<!---
May need to create the file and name it the date and time it was run
inorder to prevent file errors and locks.
--->
<CFSET tempfile =
"e:\inetpub\wwwroot\reports\exptemp.csv"><!---D:\reports\exptemp.csv
D:\temp\exptemp.csv --->
<!---
this is creating the temp file coloum names and leaving the rest of
the column blank
--->
<CFSET output = "">
<CFSET output = output & "AdviserName,AdviserAspect,CoachName">
<CFFILE ACTION="WRITE"
FILE="#tempfile#"
OUTPUT="#output#">
<!---
This is grabbing the information in the column so later Ill drop it
into the spredsheet. I a little afraid useing the loop
but it seems to be working fine.
--->
<CFLOOP QUERY="GetMyShit">
<CFSET output = "">
<CFSET output = output &
"#AdviserName#,#AdviserAspect#,#CoachName#">
<!--- This is 'APPENDING' what the loop above grabbed to the .xls file
written earlier by the the WRITE action of the cffile --->
<CFFILE ACTION="Append"
FILE="#tempfile#"
OUTPUT="#output#"
Variable="application/msexcel"><!--- <a
href="../Reports/exptemp.csv">Untitled</a> --->
<!--- Im not sure if that variable is really doing anything but the book
said that it needed it? I dont know but I do know
that if it works dont mess with it --->
</CFLOOP>
<!---
This is a link to the file just written to the temp folder so the
user can open it. I need to create a shared folder on the network
b4 I would even think of useing this on the floor. Im thinking the
uploads folder but Ill see.
--->
<a href="\\castle_weba/reports/exptemp.csv">Click Here to open your report
in Excel!</a><!--- \\castle_weba/d$/TEMP/exptemp.csv --->
<!--- \\castle_weba/d$/reports/exptemp.csv --->
-----Original Message-----
From: Cary Gordon [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 05, 2000 7:22 AM
To: [EMAIL PROTECTED]
Subject: Re: CF to Excel
The easiest way is to output an Excel readable text file, like a csv or tab
delimited file.
Cary
At 02:01 PM 6/2/2000 -0700, you wrote:
>How can I take the results of a Query and save it as an Excel file?
>
>This is what I though would work.
>
>Thanks all!
>
><CFQUERY NAME="DIMS" DATASOURCE="DSTS">
> SELECT END_ITEM_ROOT_PN, END_ITEM_SN
> FROM DSTS.B_V_DSTS_ASSEMBLY
> ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN
></CFQUERY>
><cfcontent type="application/msexcel">
>
><CFOUTPUT QUERY="DIMS">#END_ITEM_ROOT_PN# #END_ITEM_SN#</CFOUTPUT>
>
>Jim Ray
>Delta Program NT Administrator
>The Boeing Company
>(714) 896-2038
>Email: [EMAIL PROTECTED]
>Website: http://deltaweb.lgb.cal.boeing.com/
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.