Skip to main content
Participant
October 6, 2011
Question

ColdFusion - How to convert table into CSV?

  • October 6, 2011
  • 2 replies
  • 5439 views

Hi -

Trying to query a database table and turn it into a CSV file... Is there a special ColdFusion tag or protocall for this??

I have a job posting for this at Guru.com - it should only take a couple hours.

http://www.guru.com/pro/ProjectDetail.aspx?ProjectID=762752

Sincere thanks,

--
Peter Ruppe

Account Director

Codex Creative

Tel 312.623.7349

1520 N. Damen | Suite A-1 | Chicago, IL 60622

Email | Peter.Ruppe@codexcreative.com

codexcreative.com

This topic has been closed for replies.

2 replies

Inspiring
October 6, 2011

I'd simply use cffile.

Does your data contain any comma's?

Participant
October 6, 2011

Oooo.. good point! We would have to format te output correctly for the description column then. What would be the command for that?

Would I have to do a cfloop to get all the lines?

I'm trying, but am getting errors. ... This seems like it should be easier to do than what i'm experiencing.

Inspiring
October 7, 2011

Don't ignore the first reply.  That function might be just what you are looking for.

Inspiring
October 6, 2011

Search cflib.org for csvformat; it is a custom tag that we use in several of our apps to turn queries into CSV... should be very straightforward to incorporate.

--

/ron