From: Marcio Carneiro Date: 2011-10-08T03:14:07+09:00 Subject: Re: Read thru Csv file and store it in variables --002215974eea136bb704aeb968b9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Maybe using bash before using ruby. 2011/10/5 ideal one > HI All, > I need to read thru Excel file saved as CSV. Exclude the header > and store the data in variables. > Based on the number of records the script has to go thru that number of > iterations. > > I tried just s simple faster_csv code, which isnt working!! > > require 'rubygems' > require 'faster_csv' > > path =3D "C:/Users/test/Desktop/data.txt" > > FasterCSV.foreach(path) do |row| > puts row > > end > > > > C:/Program > Files/Ruby/lib/ruby/gems/1.9.1/gems/fastercsv-1.5.4/lib/faster_csv.rb:13:= in > `const_missing': Please switch to Ruby 1.9's standard CSV library. It's > FasterCSV plus support for Ruby 1.9's m17n encoding engine. > (NotImplementedError) > > > I am not aware of this error, Can any of you plz recommend better way to > achieve the result. > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > --=20 Analista de Sistemas *MBA em Log=C3=ADstica, Mobiliza=C3=A7=C3=A3o e Meio Ambiente/GETRAM =E2=80=93 Ger=C3=AAncia Execut= iva de Transportes e Mobiliza=C3=A7=C3=A3o* * * Provedor de Servi=C3=A7os na InterNet Aten=C3=A7=C3=A3o: Esta carta pode conter anexos no formato *ODF* (*Open Do= cument Format*)/*ABNT* (extens=C3=B5es *odt*, *ods*, *odp*, *odb*, *odg*). Antes d= e pedir os anexos em outro formato, voc=C3=AA pode instalar gratuita e livrem= ente o *BrOffice* (http://www.broffice.org) ou o seguinte Aditivo para Microsoft Office (R) (http://www.sun.com/software/star/odf_plugin/get.jsp). --002215974eea136bb704aeb968b9--