FasterCSV - write tab delimited files

C

Cs Webgrl

Hi,

I'm using FasterCSV to write out a tab delimited file. For empty
fields, does anyone know if there's a way to not put in empty quotes
("") for nil or blank fields?

Thanks
 
J

James Edward Gray II

I'm using FasterCSV to write out a tab delimited file. For empty
fields, does anyone know if there's a way to not put in empty quotes
("") for nil or blank fields?

The behavior you describe, not quoting empty fields, is the default for =
FasterCSV:
require "rubygems" =3D> true
require "faster_csv" =3D> true
FCSV.generate:)col_sep =3D> "\t") { |csv| csv << [1, 2, nil, 4] }
=3D> "1\t2\t\t4\n"

James Edward Gray II=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top