Nov. 17, 2011
7:30 a.m.
I will have a look somewhere in the next couple of days. On 17 Nov 2011, at 05:15, Dennis Schetinin wrote:
Sure.
I've loaded CSVParser from http://www.squeaksource.com/CSVParser.html and patched one method there:
nextRow | row | row := OrderedCollection new. stream skipSeparators. [self atEndOfLine] whileFalse: [row add: self nextValue]. "stream skip: -1." stream next = $, ifTrue: [row add: '']. ^ row
This is how I test it:
stream := FileStream readOnlyFileNamed: 'Data.csv'. [(CSVParser on: stream) useDelimiter: $;; rows ] ensure: [stream close].
I attach the bigger data file. The shorter one can be produced by deleting rows.