Read a specific column from a csv file in C#

后端 未结 6 1436
天命终不由人
天命终不由人 2021-01-23 21:44

I have a simple 3 column csv file and i need to exctract only the information from the first column. I was thinking of regular expressions, but i am hoping there is an easier mo

6条回答
  •  忘了有多久
    2021-01-23 22:24

    You can use the TextFieldParser class that is in the Microsoft.VisualBasic.FileIO namespace.

    It will parse the file and the resulting object can be queried, so you will be able to get the values in the first column.

提交回复
热议问题