I'll take a stab at this, since its been dormant for a while.
First, excel is not a database. Its a spreadsheet of values and stuff.
Calling it a database will only make people upset at you.
Now, you have an excel dataStore, we'll use that term.
I would put the entire excel data into a dataset.
Google:
LoadDataSet Excel
for some examples. They usually have the query like "Select * from $Sheet1"
......
Then you could loop over your rows, and as you find a value, do a .Select
and see what the count it.
Here is crappy example
foreach (string lastName in allLastNames)
{
DataRow[] foundRows = ds.People.Select("LastName='" + lastName + "'";
if(null!=foundRows)
{
if(foundRows.Length > 1)
{
//a duplicate
}
}
}
OR
http://support.microsoft.com/kb/325685
You can try to get that thing to work and then do GroupBy's on something
like emailaddress or something like that.
........
I don't know. This is why excel really isn't a database.
Even a crappy database like Access has "Select Email, Count(*) as MYCount
from People where Count(*) > 1"
Good luck.