[Tutor] Wanted: module to parse out a CSV line

Magnus Lycka magnus@thinkware.se
Wed Dec 11 10:05:02 2002


At 23:56 2002-12-11 +1100, Dave Cole wrote:
>Have you checked what Excel does with that data?

It behaves worse than csv it seems. ;) Why am I not surprised.
I'm happy that you don't need to mimic that exactly!

1       directly
after
comma"
2        "space
after comma"
3         "two
spaces
after
comma"
4               tab after
comma"

It doesn't seem to honour the concept of line breaks in strings on import.
But it removes the " before directly even though it obviously didn't fint
a match. But as soon as there is space after the comma, the " is left as
it is. Even though I explicitly marked , as separator, a tab after the
comman made the text after ,\t end up in column C instead of B!



-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se