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.
9e000542479e1c2d1679bdd503c26af7?d=identicon&s=25 Dhaval Phansalkar (dhaval)
on 2009-03-19 18: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.

F988ddc9128c0b4e8f1fda9d3a3435e9?d=identicon&s=25 Eifion Bedford (Guest)
on 2009-03-19 19:57
(Received via mailing list)
Have you looked a Comma, ?

Twitter: @eifion
53be54e5db4dc58e4980db5a8255621b?d=identicon&s=25 Harold (Guest)
on 2009-03-19 22:10
(Received via mailing list)
Ruports is pretty slick:

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