0

I have a sorted csv file. How to read just rows with ordered value and write them to datagridview.For example read just rows where value of Age is 22. the file looks like:

ID Name Surname Age Salary
1  John Asben   33  1000
2  Adam Smith   22  1200
3  Amanda J     22  2000
4  George Villis 36  2300
Raphaël Althaus
  • 59,727
  • 6
  • 96
  • 122
bali katravella
  • 57
  • 1
  • 2
  • 9

1 Answers1

1

About reading CSV files in .NET: Reading a CSV file in .NET?

Depending on the CSV parser type and the classes you'll get the CSV data in, you could apply a filter while parsing, apply a filter on the parsed data or add a View filter to the grid. I'm sure there are also other methods.

Community
  • 1
  • 1
Hauke P.
  • 2,695
  • 1
  • 20
  • 43