Brian Candler
5/18/2007 5:10:00 AM
On Fri, May 18, 2007 at 09:06:39AM +0900, Mark Stroeve wrote:
> I'am trying to add new lines to a existing csv file, but i only get one
> line.
> It doesn't add additional lines, i pasted te code below, has anyone a
> suggestion how to write new lines?
>
>
> require 'fastercsv'
>
>
> FasterCSV.open("d:/file.csv", "w") do |csv|
> csv << [@params[:ha_gewas2], "first name", "last name", "email"]
> end
Open using "a" instead of "w" to append to the file. See "ri IO" for a list
of file modes.