Find text in column of a .csv file. Add/modify text if does not exist.

  • Thread starter Thread starter Francesco2017
  • Start date Start date
F

Francesco2017

Guest
Hi all,

I am using C#.

I have a .csv file formatted as below.


COMPONENT, FREQUENCY

C456, 45

V345, 34

etc.

I want to search, for example, for C456.

If C456 does NOT exist, then add it into COMPONENT column and add 1 into the FREQUENCY column.

If C456 DOES exist, simply increment the number in the FREQUENCY column.

Regards


Francesco

Continue reading...
 
Back
Top