From: Junkone Date: 2008-06-06T02:29:02+09:00 Subject: Re: faster csv issue On Jun 4, 6:06 pm, James Gray wrote: > On Jun 4, 2008, at 4:49 PM, Junkone wrote: > > > not sure why fastercsv cannot parse this. cannot find anything wrong > > with my code either. why does it show invalid arguement. > > I don't see the "Invalid Argument error here, but you should be using   > parse() instead of read(), if the content comes from a String: > > #!/usr/bin/env ruby -wKU > > require "rubygems" > require "faster_csv" > > csv = < "ClientAccountID > ","CurrencyPrimary > ","AssetClass > ","Symbol","OptionFutureCode","Quantity","MarkPrice","CostBasisPrice" > "6814789","USD","STK","CSUN","","125","11.9800","12.1750" > "6814789","USD","STK","SIMO","","150","20.0500","19.186667" > END_CSV > > p FCSV.parse(csv, :col_sep => ",", :headers => true) > > __END__ > > Hope that helps. > > James Edward Gray II thanks james.