Compare between 2 Excel files using c#.

Oct 3 2009 6:45 AM

Hi.

I am pretty new to Excel, so have much Headache as compare to other DB. I have two Excel sheets, as below. I have to compare Excel1 with Excel2. In Excel 1 you can see I have a column "Phone". Now I need to compare Excel1 with Excel2, If I get Name, Street, County  same in both the Excel (Please check I highlighted in yellow ) then I need to pick the Phone of that row and insert it in  Excel2(Before that I need to generate a Phone column also in Excel2).

Excel1

Name

Street

County

Phone

Donald

Alm3y

CA

99911

Hary

Xxx8l

Am

456566

Peter

Yyy7fg

Amjk

44552

Mc Lawson

Ghj6f

Apmh

455633

Gimmy

Kho9r

Pmhg

15465


 Excel2

Name

State

Street

County

Zip

Denly

MKOP

Sdgvhg

CL

1112223

Donald

CAF

CA

CA

415445

Roin

FHJK

Sdvj

dsff

65655

Mc Lawson

GHTY

Apmh

Apmh

654655

Rony

Sajhh

avbsd

sdgsdg

546568574


Hope you can understand. Thanks in advance.

Answers (2)