[erlang-questions] CSV file help

Lucky Khoza mrkhoza@REDACTED
Mon Nov 12 08:54:25 CET 2012


Hi Erlang Developers,

Where do i start in terms of reading CSV file, because i tried to use this
rountines:

{ok,String} = file:open("produce.csv",read).
io:get_line(String, ' ').

but when i used this rountine: io:get_line(String,' ') to read each line i
got this tuple: {error,terminated},

And the file i'm trying to read is like this:

"Supplier ID","Product Code","Product Description","Delivery Date","Unit
Price","Number of Units"
15,1101,"Apples 1kg Golden Delicious. The sweetest Apples! Always a
favourite. Love, Mrs. Hollingberry","2012/02/15",1505,5

Thanks in advance for your help.

Kindest Regards
Lucky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121112/376e48fa/attachment.htm>


More information about the erlang-questions mailing list