Forum: Ruby on Rails generate csv from ruby object

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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.

Eifion Bedford (Guest)
on 2009-03-19 20:57
(Received via mailing list)
Have you looked a Comma, ?

Twitter: @eifion
Harold (Guest)
on 2009-03-19 23:10
(Received via mailing list)
Ruports is pretty slick:

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