Forum: Ruby on Rails generate csv from ruby object

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dhaval P. (Guest)
on 2009-03-19 19:55
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
Eifion Bedford (Guest)
on 2009-03-19 20:57
(Received via mailing list)
Have you looked a Comma, http://redartisan.com/2009/3/10/comma-intro ?

Eifion
http://asciicasts.com
Twitter: @eifion
Harold (Guest)
on 2009-03-19 23:10
(Received via mailing list)
Ruports is pretty slick:
http://rubyreports.org/

On Mar 19, 1:55 pm, Dhaval P. <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.