wmortensen
08-11-2005, 01:13 AM
I am having problems loading a CSV file into a listbox.
http://ichart.finance.yahoo.com/table.csv?s=ADTN&d=7&e=11&f=2005&g=d&a=7&b=10&c=1994&ignore=.csv
There seems to be an ascii character at the end of each line. It load the who file into one line. I am trying to load one line at a time including the ",". Does anyone know how to get arround this? If I re-save the file in UltraEdit is works fine.
-------------------------------------
Dim tempString As String
Open "C:\Temp\ADTN.csv" For Input As 1
While Not EOF(1)
' note that tempString just holds one line at a time
Line Input #1, tempString
List3.AddItem RTrim(tempString)
Wend
Close 1
-------------------------------------
I would like it to look like this.
10-Aug-05,14.37,14.60,13.36,13.59,417900,13.59
9-Aug-05,16.09,16.09,14.40,14.46,477000,14.46
8-Aug-05,16.62,16.62,15.65,15.82,227100,15.82
5-Aug-05,16.60,16.84,16.20,16.33,206300,16.33
Regards
Warwick
http://ichart.finance.yahoo.com/table.csv?s=ADTN&d=7&e=11&f=2005&g=d&a=7&b=10&c=1994&ignore=.csv
There seems to be an ascii character at the end of each line. It load the who file into one line. I am trying to load one line at a time including the ",". Does anyone know how to get arround this? If I re-save the file in UltraEdit is works fine.
-------------------------------------
Dim tempString As String
Open "C:\Temp\ADTN.csv" For Input As 1
While Not EOF(1)
' note that tempString just holds one line at a time
Line Input #1, tempString
List3.AddItem RTrim(tempString)
Wend
Close 1
-------------------------------------
I would like it to look like this.
10-Aug-05,14.37,14.60,13.36,13.59,417900,13.59
9-Aug-05,16.09,16.09,14.40,14.46,477000,14.46
8-Aug-05,16.62,16.62,15.65,15.82,227100,15.82
5-Aug-05,16.60,16.84,16.20,16.33,206300,16.33
Regards
Warwick