Excel file result in ColdFusion, creating new lines

I have several coldfusion pages set up that provide me with an Excel file from the database.  On the most recent one that I set up, I ask for the entire database.  One of the problems is there are around 30 fields, and when it creates an Excel worksheet, it creates a second line to fill in half of the data.  I want all the fields to appear in one line.  I do have a #carriage# at the end of it, but is there a way to tell it not to return in the middle?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

gdemariaConnect With a Mentor Commented:
> Can I use the table with cells, etc, and it will still come out as an excel sheet using the above commands?

Yes, a table with cells will work the same way.   It may help delimit if you have line breaks in your data

when I export to excel I use an HTML table to place the data into the rows and columns.   How are you doing it?

Do you have any line breaks in your data?  you may have to search for them and replace them
ServalStudiosAuthor Commented:
I have it all like this


I use the

<CFHEADER NAME="Content-Disposition" VALUE="inline; filename=myfile.xls">
<CFCONTENT TYPE="application/vnd.msexcel">

Can I use the table with cells, etc, and it will still come out as an excel sheet using the above commands?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

perhaps you can set #tab# = "</td><td>"
and add
<tr><td> to the start of the line
to the end of the line

with, of course, <table> and </table> at both ends

for a test..
ServalStudiosAuthor Commented:
Exporting it as a table is great.  Only problem is that I need to set a style for date and currency fields:

The one big problem I have is data with a return in it. I have tried putting < BR > in the field, but it ends up making another line in Excel
If you're having some trouble, you should add a post with your issue rather than closing the question with a B grade.   Most experts are willing to see you through to a complete conclusion.
All Courses

From novice to tech pro — start learning today.