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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML <BR> Generates Multiple Rows in Excel

Status
Not open for further replies.

aldovalerio

Programmer
Mar 29, 2001
36
CH
CF v5, Excel 2000. I'm generating Excel output using the Internet Explorer Excel add-in. I create an HTML table and use the <CFCONTENT TYPE=&quot;application/vnd.ms-excel&quot;> tag. My output is mainly text, retrieved from SQL Server, with embedded carriage returns+line feeds (ascii 13+10). I use REPLACE to convert ascii 13+10 to an HTML <BR> tag: #Replace(&quot;#getSelection.Supplier_Address#&quot;,&quot;#CRLF#&quot;,&quot;<br>&quot;,&quot;ALL&quot;)#. If I view my output in straight HTML, it displays multiple lines (separated by <BR>) within one <TD> cell. When I add my CFCONTENT tag to generate Excel, it displays a separate row for each <BR>, and thus separate cells. I would like to have the carriage returns embedded in my text in a single cell, like in the HTML output. Anyone know how to do this with just straight CF and Excel; no 3rd party add-ins? I've thought of a solution with a CSV file (not tested yet) but I'm using some style properties such as colors, which would be lost if I generated a text file first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top