How to open a .CSV file ?

S

Scott M.

I have provided a solution that will work. In *some* scenarios your
solution is better (better being defined as more efficient and/or less
involved and/or less prone to exceptions and/or more scalable). In *some*
scenarios my suggestion is better (same definition).

Now, these are all quantifiable things. Can you show me that your solution
is better in all cases in a quantifiable way? Can you do it other that just
saying your right and that I'm an idiot?

If you keep your mind closed then you learn nothing. You have clearly
demonstrated that you have a closed mind (and that's not my opinion - it's a
fact based on your own messages), so I really doubt how much knowledge you
have and how much you can contribute to the discussion.

Good bye & good luck.



GhostInAK said:
Hello Scott M.,
I'm really having trouble understanding why you feel the need to
insult people who have not insulted you?

I don't have any tollerence for idiocy.
I'm also having difficulty understanding why you haven't bothered to
read any of what I wrote. I know that you haven't, because if you
had, you certainly wouldn't say that by my reasoning every file should
be accessed as a string. How can I know that? Well, because I never
said that. In fact, I said (on more than one occassion) exactly the
opposite (and agreed with you).
Why not just use a StreamReader class and parse the values at the
commas?
You can use this technique to parse the file at any character, it
doesn't have to be the comma.
As for the .Split method of a string, it most certainly would serve a practical purpose [...]
we are talking about a file that contains nothing but a string within
it, so using string methods on this string is hardly "stupid".

A string is just a data type that holds a collection of chars.. so all
files are just one big string.
[...] but by no means is it the "right" way. The OP said very little
about
the size of the CSV or how complex the data inside it is.

So if one method handles all scenarios, and another doesn't.. and we don't
know what the inputs are.. then yes there is most definately a Right Way
of doing things. String manipulation, in this case, aint it.
Clearly, you just feel you need to take out some frustration you have
on others. Because any objective person reading what I wrote would
not come to the conclusions you've come to. It sort of sounds like it
doesn't matter what anyone says, you've got the "my way or the
highway" mentality.

Yes.. I feel very frustrated when given a choice between the Right Way and
the Wrong Way, people choose the Wrong Way. I feel frustrated at all
exhibitions of idiocy. This is not to say that idiocy is a permanent
condition. And if people would accept that they were being an idiot for a
moment and then look at the solution provided to correct the situation
their idiocy level would drop dramatically. But no, people cling to being
called an idiot and don't pay attention to the provided solution. "OH MY
GOD! HE CALLED ME AN IDIOT!! What an uncaring bastard!" Hell with you.
Look past being an idiot and look at the solution.

Programming is a form of engineering. It's akin to building any kind of
physical structure. You wouldn't, for example, build a suspension bridge
and then line it with gravel, or build a grass hut in Fairbanks, Alaska.
You could certainly do these things, but if the goal is to build a vehicle
bridge that will last 100s of years, or a domicile for humans to live in,
these are Wrong things to do. The same goes for programming. Just
because something "works" (oh look, the grass hut is livable! It's sunny
and 80 degrees out!) doesnt mean it's the Right Thing (oh crap, its
February and -45 degrees.. and I'm dead because my grass hut wont hold
heat).

-Boo
 
S

Scott M.

By the way, you should take a look at this:

http://www.devarticles.com/c/a/ASP.NET/Reading-a-Delimited-File-Using-ASP.Net-and-VB.Net/

and then you should contact: G Ajaykumar ([email protected]) to
tell him that he is an idot and that he should go "to hell" for having the
odassity to suggest the exact same thing I did. Only he is worse than I am
because he posted it at the very popular and widely regarded web site
http://ASP.net.

In fact, you should really block off some time to spread the word about all
the idiots out there because most of the suggestions on solving this problem
suggest either a StreamReader or some variation of that.

http://www.google.com/search?source...LJ,GGLJ:2006-36,GGLJ:en&q=reading+.csv+vb.net

To make matters worse, there are actually many developers out there
suggesting the "wrong" course of action on escaping out any trouble
characters in the .csv in the same manner that I suggested.

Yes, now I see the error of my ways. I may be an idot, but at least I'm in
good company AND fortunately, you are in that same group






GhostInAK said:
Hello Scott M.,
I'm really having trouble understanding why you feel the need to
insult people who have not insulted you?

I don't have any tollerence for idiocy.
I'm also having difficulty understanding why you haven't bothered to
read any of what I wrote. I know that you haven't, because if you
had, you certainly wouldn't say that by my reasoning every file should
be accessed as a string. How can I know that? Well, because I never
said that. In fact, I said (on more than one occassion) exactly the
opposite (and agreed with you).
Why not just use a StreamReader class and parse the values at the
commas?
You can use this technique to parse the file at any character, it
doesn't have to be the comma.
As for the .Split method of a string, it most certainly would serve a practical purpose [...]
we are talking about a file that contains nothing but a string within
it, so using string methods on this string is hardly "stupid".

A string is just a data type that holds a collection of chars.. so all
files are just one big string.
[...] but by no means is it the "right" way. The OP said very little
about
the size of the CSV or how complex the data inside it is.

So if one method handles all scenarios, and another doesn't.. and we don't
know what the inputs are.. then yes there is most definately a Right Way
of doing things. String manipulation, in this case, aint it.
Clearly, you just feel you need to take out some frustration you have
on others. Because any objective person reading what I wrote would
not come to the conclusions you've come to. It sort of sounds like it
doesn't matter what anyone says, you've got the "my way or the
highway" mentality.

Yes.. I feel very frustrated when given a choice between the Right Way and
the Wrong Way, people choose the Wrong Way. I feel frustrated at all
exhibitions of idiocy. This is not to say that idiocy is a permanent
condition. And if people would accept that they were being an idiot for a
moment and then look at the solution provided to correct the situation
their idiocy level would drop dramatically. But no, people cling to being
called an idiot and don't pay attention to the provided solution. "OH MY
GOD! HE CALLED ME AN IDIOT!! What an uncaring bastard!" Hell with you.
Look past being an idiot and look at the solution.

Programming is a form of engineering. It's akin to building any kind of
physical structure. You wouldn't, for example, build a suspension bridge
and then line it with gravel, or build a grass hut in Fairbanks, Alaska.
You could certainly do these things, but if the goal is to build a vehicle
bridge that will last 100s of years, or a domicile for humans to live in,
these are Wrong things to do. The same goes for programming. Just
because something "works" (oh look, the grass hut is livable! It's sunny
and 80 degrees out!) doesnt mean it's the Right Thing (oh crap, its
February and -45 degrees.. and I'm dead because my grass hut wont hold
heat).

-Boo
 
S

Scott M.

Correction:

....AND fortunately, you are NOT in that same group.

Scott M. said:
By the way, you should take a look at this:

http://www.devarticles.com/c/a/ASP.NET/Reading-a-Delimited-File-Using-ASP.Net-and-VB.Net/

and then you should contact: G Ajaykumar ([email protected]) to
tell him that he is an idot and that he should go "to hell" for having the
odassity to suggest the exact same thing I did. Only he is worse than I
am because he posted it at the very popular and widely regarded web site
http://ASP.net.

In fact, you should really block off some time to spread the word about
all the idiots out there because most of the suggestions on solving this
problem suggest either a StreamReader or some variation of that.

http://www.google.com/search?source...LJ,GGLJ:2006-36,GGLJ:en&q=reading+.csv+vb.net

To make matters worse, there are actually many developers out there
suggesting the "wrong" course of action on escaping out any trouble
characters in the .csv in the same manner that I suggested.

Yes, now I see the error of my ways. I may be an idot, but at least I'm
in good company AND fortunately, you are in that same group






GhostInAK said:
Hello Scott M.,
I'm really having trouble understanding why you feel the need to
insult people who have not insulted you?

I don't have any tollerence for idiocy.
I'm also having difficulty understanding why you haven't bothered to
read any of what I wrote. I know that you haven't, because if you
had, you certainly wouldn't say that by my reasoning every file should
be accessed as a string. How can I know that? Well, because I never
said that. In fact, I said (on more than one occassion) exactly the
opposite (and agreed with you).
Why not just use a StreamReader class and parse the values at the
commas?
You can use this technique to parse the file at any character, it
doesn't have to be the comma.
As for the .Split method of a string, it most certainly would serve a practical purpose [...]
we are talking about a file that contains nothing but a string within
it, so using string methods on this string is hardly "stupid".

A string is just a data type that holds a collection of chars.. so all
files are just one big string.
[...] but by no means is it the "right" way. The OP said very little
about
the size of the CSV or how complex the data inside it is.

So if one method handles all scenarios, and another doesn't.. and we
don't know what the inputs are.. then yes there is most definately a
Right Way of doing things. String manipulation, in this case, aint it.
Clearly, you just feel you need to take out some frustration you have
on others. Because any objective person reading what I wrote would
not come to the conclusions you've come to. It sort of sounds like it
doesn't matter what anyone says, you've got the "my way or the
highway" mentality.

Yes.. I feel very frustrated when given a choice between the Right Way
and the Wrong Way, people choose the Wrong Way. I feel frustrated at all
exhibitions of idiocy. This is not to say that idiocy is a permanent
condition. And if people would accept that they were being an idiot for
a moment and then look at the solution provided to correct the situation
their idiocy level would drop dramatically. But no, people cling to
being called an idiot and don't pay attention to the provided solution.
"OH MY GOD! HE CALLED ME AN IDIOT!! What an uncaring bastard!" Hell
with you. Look past being an idiot and look at the solution.

Programming is a form of engineering. It's akin to building any kind of
physical structure. You wouldn't, for example, build a suspension bridge
and then line it with gravel, or build a grass hut in Fairbanks, Alaska.
You could certainly do these things, but if the goal is to build a
vehicle bridge that will last 100s of years, or a domicile for humans to
live in, these are Wrong things to do. The same goes for programming.
Just because something "works" (oh look, the grass hut is livable! It's
sunny and 80 degrees out!) doesnt mean it's the Right Thing (oh crap,
its February and -45 degrees.. and I'm dead because my grass hut wont
hold heat).

-Boo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top