直接比较Excel表也是可以的,将两个表,第一个表和第二个表,身份证号码都在第一列,第一个表正确:
Dim Book As New XLS.Book()
Dim Sheet1 As XLS.Sheet = Book.Sheets(0)
Book.Sheets.Add() '增加一个工作表
Dim Sheet2 As XLS.Sheet = Book.Sheets(1) '引用新增加的工作表
For i as integer = 0 To Sheet1.Rows.Count -1
if Sheet1(i, 0).Text <> Sheet2(i, 0).Text Then
Sheet2(i, 1).Value = "这个错了"
End if
Next
相关知识点:
http://www.foxtable.com/help/topics/1144.htm
http://www.foxtable.com/help/topics/1160.htm
[此贴子已经被作者于2012-7-6 14:58:59编辑过]