On Mon, 20 Feb 2006 15:22:27 -0800, P K <PK@discussions.microsoft.com> wrote:
I read a CSV file using a stream reader.
I read a complete line using readline. I need to get hold of each column.
I can't use split function with a comma cos the contents in the columns
might have comma too.
How best to handle this?
I have to use a reader only in this case.
Thanks
PK
PK,
You will have to ask your client to delimit the fields with tabs. It is rare
for data meant for parsing to have tabs in the rows.
Another thought; Are the areas that have commas in the data surrounded by double
quotes? I've seen this before. If so you might try to determine a way to not
split on commas that are between quotes.
You have a nice puzzle to solve, my friend.
Otis Mukinfus
http://www.arltex.com http://www.tomchilders.com