My guess is you are correct.  What happens if you leave the cfset's where
they are and just remove the cfoutput from around them?  I believe the page
should still work and you won't get the extra lines.

Just my thoughts.
______________________________________________________ 

Bill Grover     
Supervisor MIS                  Phone:  301.424.3300 x3324      
EU Services, Inc.               FAX:    301.424.3696    
649 North Horners Lane          E-Mail: [EMAIL PROTECTED]
Rockville, MD 20850-1299        WWW:    http://www.euservices.com
______________________________________________________ 



> -----Original Message-----
> From: Aunger, Mitch [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 02, 2002 5:39 PM
> To: CF-Talk
> Subject: extra blank lines problem
> 
> 
> Hello, (don't you people take american holidays off? ;)
> 
> I have a page that exports data to an Excel spreadsheet. I am 
> able to export
> all of the data with headers into Excel, however I am 
> experiencing some
> difficulty with blank rows in between my rows of data (5 blank rows in
> between each to be exact).
> 
> Here is my code:
> 
> <cfquery name="get_metrics">
> select *
> from table
> </cfquery>
> 
> <!--- Set the special character variables --->
> <!--- Tab --->
> <cfset tabchar = Chr(9)>
> <!--- Line Break --->
> <cfset newline = Chr(13) & Chr(10)>
> 
> <cfcontent type="application/msexcel">
> 
> <!--- Write headers to Excel - metrics.xls. This file resides 
> on the server,
> opens on the user's desktop. --->
> <cfheader name="Content-Disposition" 
> value="filename=metrics_customer.xls">
> <cfoutput>CATEGORY#tabchar#TYPE#tabchar#SYSTEM NAME#tabchar#SURVEY
> DATE#tabchar#REQUESTOR NAME#tabchar#REQUESTOR PHONE#tabchar#REQUESTOR
> DEPT#tabchar#REQUESTOR EMAIL#tabchar#RESPONDANT ORG#tabchar#SLC
> PHASE#tabchar#RESPONDANT NAME#tabchar#RESPONDANT 
> PHONE#tabchar#RESPONDANT
> EMAIL#tabchar#SITE#tabchar#QUESTION 1#tabchar#QUESTION 1
> COMMENT#tabchar#QUESTION 2#tabchar#QUSTION 2 COMMENT#tabchar#QUESTION
> 3#tabchar#QUESTION 3 COMMENT#tabchar#QUESTION 4#tabchar#QUESTION 4
> COMMENT#newline#</cfoutput>
> 
> <cfloop query="get_metrics">
> 
> <cfif get_metrics.category eq "1">
> <cfset cat = "Application Implementation">
> <cfelseif get_metrics.category eq "2">
> <cfset cat = "Application / Tool Support">
> <cfelseif get_metrics.category eq "3">
> <cfset cat = "Program Support">
> <cfelse>
> <cfset cat="SEPG">
> </cfif>
> 
> <cfif get_metrics.type eq "0">
> <cfset typeof = "System">
> <cfelse>
> <cfset typeof = "Service">
> </cfif>
> 
> <!--- Line Break --->
> <cfset br = Chr(13) & Chr(10)>
> 
> <cfoutput>
> <!--- Remove all Line Breaks from the fields, replace with a 
> space. --->
> <cfset q1_commenta = Replace(q1_comment, br, " ", "ALL")>
> <cfset q2_commenta = Replace(q2_comment, br, " ", "ALL")>
> <cfset q3_commenta = Replace(q3_comment, br, " ", "ALL")>
> <cfset q4_commenta = Replace(q4_comment, br, " ", "ALL")>
> </cfoutput>
> 
> <!--- Write data to Excel. --->
> <cfoutput>#cat##tabchar##typeof##tabchar##system_name##tabchar
> ##dateformat(s
> urvey_date, "yyyy mmm
> dd")##tabchar##request_name##tabchar##request_phone##tabchar##
> request_dept##
> tabchar##request_email##tabchar##respon_org##tabchar##slc_phas
> e##tabchar##re
> spon_name##tabchar##respon_phone##tabchar##respon_email##tabch
> ar##site##tabc
> har##q1_response##tabchar##q1_commenta##tabchar##q2_response##
> tabchar##q2_co
> mmenta##tabchar##q3_response##tabchar##q3_commenta##tabchar##q
> 4_response##ta
> bchar##q4_commenta#</cfoutput>
> </cfloop>
> 
> I think the problem is with the cfoutput tags around the 
> cfset tags. Is
> there a way to work around this? I have tried using the 
> replace directly in
> my variables that I write to Excel, but I get an error.
> 
> Any help would be greatly appreciated!
> 
> Thanks,
> Mitch
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to