Re: How to parse CSV
Re: How to parse CSV
- Subject: Re: How to parse CSV
- From: Benedikt Quirmbach <email@hidden>
- Date: Wed, 23 Jan 2008 10:52:18 +0100
Hello list,
after I worked a time on my handler with really great help of Skeeve
here from the list, I found the following:
The main problem is, that AppleScript can't work with big csv-files.
I wrote a handler that converts the csv-file into a list of lists.
This takes some time, but it is OK.
My test file had about 200 lines and 7 items every line.
The real csv files have up to 35000 lines and up to 10 items every line.
Here the handler works endless. As Skeeve said (he testet with 10000
lines) there is a stack overflow.
So I'm wondering: can that be true?
Does anybody know something about list limitations?
Benedikt
P.S.: Your thoughts I reed here in the list are all true: CSV is a
format that is not easy to handle. I will try to write a handler that
can handle just the files i get from my customers. This means:
- convert the text encoding to unicode
- convert the line breaks
- convert to lists
The csv file are usually very simple. All items are texts. It is
allways possible to find an item delimiter that will not occure in
the text. that's why the items usually are not enclosed by quotes.
There are no dates or numbers to be converted.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden