mannyGonzales,
In addition to the others comments, I used String.Trim to remove the leading
& trailing quote marks on the string after I did the split in a project I
worked on.
indata = instr.Split(","c)
For index As Integer = 0 To indata.Length -1
indata(index) = indata(index).Trim(""""c)
Next
Not sure why I did the above as opposed to using Replace on the input to
Split. Note my project used the String.Split function that accepts a Char,
rather than the VB Split function that accepts a string.
Hope this helps
Jay
"mannyGonzales" <mg*******@bertlingusa.com> wrote in message
news:1f*****************************@phx.gbl...
Hey guys,
Very common task: read a csv file. My data reads as:
"1","2","3",
my code reads this way:
While filename.Peek > -1
instr = filename.ReadLine
indata = Split(instr, ",")
End While
Problem: my values are coming out as ""1""
What's my solution?
Thanks