开发者

How do I read the fields in a csv file and load their values into variables?

开发者 https://www.devze.com 2023-01-30 00:05 出处:网络
I am using Visual Basic 10, and am attempting to convert an old VB6 program. How do I read a csv file and load the fi开发者_StackOverflowelds into

I am using Visual Basic 10, and am attempting to convert an old VB6 program. How do I read a csv file and load the fi开发者_StackOverflowelds into individual VB10 fields?


Define a class with the matching fields. Instantiate that class and set its values to what's in the CSV file. There are libraries that can help parse the CSV file, such as FileHelpers or you can take a more manual approach using the System.Io.File Class and string manipulation to parse the CSV file.

0

精彩评论

暂无评论...
验证码 换一张
取 消