generate csv from ruby object

3 views
Skip to first unread message

Dhaval Phansalkar

unread,
Mar 19, 2009, 1:55:18 PM3/19/09
to rubyonra...@googlegroups.com
hi all,

is there any method/way to generate a csv from an object directly? e.g.
@object.to_csv that will create a csv file with whatever data that
object holds?

the object that i have is a parsed xml response like @report = parsed
xml. but i'm not able to send it to csv as number of
columns,rows,headings are not fixed. this object holds report data.
thanks in advance.

-Dhaval
--
Posted via http://www.ruby-forum.com/.

Eifion Bedford

unread,
Mar 19, 2009, 2:57:01 PM3/19/09
to rubyonra...@googlegroups.com
Have you looked a Comma, http://redartisan.com/2009/3/10/comma-intro ?

Eifion
http://asciicasts.com
Twitter: @eifion

Harold

unread,
Mar 19, 2009, 5:09:50 PM3/19/09
to Ruby on Rails: Talk
Ruports is pretty slick:
http://rubyreports.org/

On Mar 19, 1:55 pm, Dhaval Phansalkar <rails-mailing-l...@andreas-
Reply all
Reply to author
Forward
0 new messages