Log In
Support
New Account
This forum
This project's trackers
This project's forums
This project's tasks
This project's releases
This project's documents
This project's news
Software/Group
People
Skill
Advanced search
Home
My Page
Project Tree
Code Snippets
Project Openings
FasterCSV
Summary
Forums
Tracker
News
SCM
Files
Forums
|
Admin
Discussion Forums:
help
Start New Thread
Nested
Flat
Threaded
Ultimate
Show 25
Show 50
Show 75
Show 100
By:
Greg Jarman
RE: modifying table header [ reply ]
2008-07-18 03:09
Hi James
Thanks for the response and great CSV library.
Cheers
Greg.
By:
James Gray
RE: modifying table header [ reply ]
2008-07-18 02:26
No, at this time FasterCSV::Table and FasterCSV::Row are read only structures. You will need to move them into a new structure to affect changes.
Also see FasterCSV.filter() though, just in case that meets your needs.
By:
Greg Jarman
modifying table header [ reply ]
2008-07-18 01:22
I can't seem to modify the header of a table. Is it supported?
table = FCSV.parse("x,y\n1,2\n3,4\n", :headers => true)
print table.to_csv
x,y
1,2
3,4
table.headers
=> ["x", "y"]
table.headers[0] = "z"
=> "z"
table.headers
=> ["x", "y"]