<div dir="ltr"><br>
<<I ususally do something like this:<br>
<br>
(((FileStream readOnlyFileNamed: 'file.csv')<br>
contentsOfEntireFile " read and close "<br>
findTokens: String crlf) " split into lines "<br>
reject: [:e | e isEmpty]) " lose empty lines "<br>
collect: [:e | e findTokens: $,] " split into fields "<br>
<br>
Regards,<br>
Zulq.>><br>
<br>
Andy Burnett wrote:<br>
> I have a small database containing questionnaire responses. The DB can<br>
> output the responses (mainly descriptive paragraphs) in CSV format.<br>
> Ideally, I would like to read each of the records into a collection of<br>
> some kind. I was hoping that there might be a 'fromCSV:' method, but I<br>
> haven't found one. One approach I had thought about was to edit the<br>
> text so in order to create a series of array definitions, and then paste<br>
> that into a workspace. However, that does lack a bit of elegance! So, is<br>
> there a neat way of doing this?<br>
><br>
> Cheers<br>
> AB<br><br>That's great Zulq, much better than my rather procedural attempts.<br><br>thanks<br>AB<br></div>