Hello,
I have come up with a new problem.
The task is: if there is an array, check each value in the array matches the values in the column A of the provided csv file. say, if ith value in the array is not present in the column , then put a null character, else put the corresponding value from column B, and show in a rich text box.
Can anybody help?
Regards
Loading
csharp beginnerPosted Nov 8, 2013, 5:26 AM
But, what i want is: when i open a file, i want read the first, say 300, and the last value, say 400, of the first column. then prepare an array where i put all numbers from 300 to 400. Then, compare each element of the column A with the array element one by one, from the file. If array element is present in the column A, then save it in an another file along with the corresponding value of it from column B. If it is not, then put a null value. And, do it till end of the file.
I have prepared some codes, check where i am going wrong.
please check the code below, that i have prepared.
HanookPosted Nov 7, 2013, 11:20 PM
1) Get the csv file columnA, ColumnB as string arrays
http://www.codeproject.com/Questions/384247/How-to-read-from-csv-file-using-csharp-net
2) then compare two string arrays
http://www.dreamincode.net/forums/topic/231454-compare-two-arrays/
http://www.codeproject.com/Questions/343263/Comparing-two-different-sized-arrays
HanookPosted Nov 7, 2013, 11:14 PM
1) Import ColumnA, ColumnB of CSV file data to a table in database ( for suppose say CSVTable )
2) compare CSVTable with array values