Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF to excel question 1

Status
Not open for further replies.

FALCONSEYE

Programmer
Jul 30, 2004
1,158
US
i am using

<cfsetting enablecfoutputonly="yes">
<cfcontent type="application/msexcel">
<cfheader name="Content-Disposition" value="filename=IncompleteOrders.xls">

to output some query results into an excel spreadsheet. somehow, it displays the debugger. is there a way to prevent this from happening?
thanks for the help in advance


 
turn off the debugger.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
You can output a comma delimited text file which can be read by excel instead of a binary stream.
 
Wiszh's suggestion will work if you don't want any formatting. I use CSV files all the time. quite helpful. However if you want it to have any kind of formatting, like colored backgrounds or text you have to either send it straight to excel like you're doing, or set up excel on the server to suck in a flat csv file and format according to conditions using VBA. So if you need formatting your options are

1) turn off the debugger and spit the data out or
2) learn vba and have a copy of excel on the server pull in a flat file, do the conditional formatting then save it as an xls file for the user.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Also you can prevent debugging on a page by page basis by setting showdebugout="no" in the cfsetting tag
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top