Excel databases

  • Thread starter Thread starter Angel's mom
  • Start date Start date
A

Angel's mom

I have created a database of names/addresses with a worksheet for each
"mailing group". Is there any way that I can check for duplicate names in
the entire database document? I have a feeling that I should not have split
up the mailing groups into separate worksheets. Thank you
 
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.
 
Back
Top