|
Dim src,srcExcel
Set src=CreateObject("Excel.Application")
src.visible=false
Set srcExcel=src.workbooks.open(srcExcelPath)
Dim dis,disExcel
Set dis=CreateObject("Excel.Application")
dis.visible=false
Set disExcel=src.workbooks.open(disExcelPath)
Dim i,j,rowcount1,columncount1,rowcount2,columncount2
Dim diffFlag1,diffFlag2
diffFlag1=false
diffFlag2=false
rowcount1=srcExcel.worksheets(srcsheet).usedrange.rows.count
columncount1=srcExcel.worksheets(dissheet).usedrange.columns.count
rowcount2=disExcel.worksheets(srcsheet).usedrange.rows.count
columncount2=disExcel.worksheets(dissheet).usedrange.columns.count
For m1=1 to rowcount1
For n1=1 to columncount1
cValue=srcExcel.worksheets(srcsheet).cells(m1,n1).value
If Isnumeric(cValue) and Isempty(cValue)=false Then
srcStartRow=m1
srcStartColumn=n1
Exit For
End If
Next
If Isnumeric(cValue) and Isempty(cValue)=false Then
Exit for
End If
Next |
|