vb.net input past end of file when importing CSV

时间:2015-10-30 22:18:49

标签: vb.net

I am using vb.net to import a CSV file and using EOF

While Not EOF(1)
    Input(1, csv_month)
End While

the CSV files i import always have a line or two lines blank at the end of the file and i get an error when it gets to the end file saying Input past end of file and it breaks the application

1 个答案:

答案 0 :(得分:3)

Use TextFieldParser instead. Input() and EOF() are more than a little obsolete.