分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
relevantcodes.com的一篇文章《VBScript: Compare 2 Excel Files》中介绍了如何用VBScript来比较两个Excel文件的数据:
http://relevantcodes.com/vbscript-compare-2-excel-files/
主要是使用了Excel的COM接口的range对象来实现的。支持比较数据并且高亮显示差异:
Class clsComparer
'[--- Region Private Variables Start ---]
Private oExcel 'Excel.Application
Private arrRangeUno 'Range.Value (array) of the Primary Excel spreadsheet
Private arrRangeDos 'Range.Value (array) of the Secondary Excecl spreadsheet
Private oDict 'Scripting.Dictionary containing unmatched cells
'[--- Region Private Variables End ---]
'[--- Region Public Variables Start ---]
Public Operation '0: Only Compare 1: Compare & Highlight Differences
'[--- Region Public Variables End ---]
'--------------------------------------------------------
' Name: Function Compare [Public]
'
' Remarks: N/A
'
' Purpose: Compares differences between 2 Excel Spreadsheets
'
' Arguments:
' sWorkBookUno: Primary Excel WorkBook (with complete path)
' vSheetUno: Primary Excel Spreadsheet Name
' sWorkBookDos: Secondary Excel WorkBook (with complete path)
' vSheetDos: Secondary Excel Spreadsheet Name
'
' Return: Boolean
'
' Author: Anshoo Arora, Relevant Codes
'
' Date: 03/17/2010
'
' References: N/A
'--------------------------------------------------------