T
thiel
Hi,
I have a problem writing a record generated with FasterCSV to a file:
This is the code:
op = File.new("C:/Test/testmap.csv", "w")
for i in 0 .. n
for j in 0 .. 12
custrecord[j] = x[i,j]
end
csv_string = FasterCSV.generate_line(custrecord)
csv_string.chop!
csv_string.gsub!(/,/, ';')
op.puts csv_string
end
The result in folder Test is: testmap.csv --> 0Kb!! (Type CSV file)
It seems a very simple program which should work.
Can anyone tell me what's wrong?
Thanks in advance,
Thiel
I have a problem writing a record generated with FasterCSV to a file:
This is the code:
op = File.new("C:/Test/testmap.csv", "w")
for i in 0 .. n
for j in 0 .. 12
custrecord[j] = x[i,j]
end
csv_string = FasterCSV.generate_line(custrecord)
csv_string.chop!
csv_string.gsub!(/,/, ';')
op.puts csv_string
end
The result in folder Test is: testmap.csv --> 0Kb!! (Type CSV file)
It seems a very simple program which should work.
Can anyone tell me what's wrong?
Thanks in advance,
Thiel