CompareRanges |
This page in 2007 Top Previous Next |
|
Identifies any differences between a pair of ranges. Applies to SYNTAX Set result1 = expression1.CompareRanges Set result2 = expression2.CompareRanges(range1, range2, testFormulas, ignoreCase, styleA1, highlightDifferences, writeReport, groupEquivalentChanges) expression1 Required. An expression that returns an IOAKAddIn object. expression2 Required. An expression that returns an IOAKAPI object. result1: An OAKResult enumeration indicating the success or otherwise of the action. result2 An ICompareResult object that gives access to the results of the comparison. range1 , range2 Required. The ranges to be compared testFormulas Required Boolean. True if the comparison is to be made in terms of cell formulas. False if the comparison is to be made in terms of cell values. ignoreCase. Required Boolean. True if the comparison is to be sensitive to case, so that Dog and dog are reported as different. False if the comparison is to be case insensitive, so that Dog and dog are not reported as different. styleA1. Required Boolean. True if the reports produced by the comparison are to display formulas in A1 notation. False if they are to display formulas in R1C1 notation. (The comparison is performed using R1C1 notation; this switch just controls how the differences are presented.) writeReport Required Boolean. True if OAK is to generate a new workbook summarizing the differences it has found. False if OAK is to generate no report workbook. groupEquivalentChanges Required Boolean. True if OAK is to attempt to minimize the differences reported between the workbooks or worksheets by grouping blocks of equivalent differences, which is likely better for a human reader. False if OAK is to report each cell difference separately, which may be better for further machine processing of the OAK output. Remarks When applied to an IOAKAddIn object, the Compare method activates the same dialog box as is presented when the relevant Compare command is selected manually from the OAK user interface. The action that follows is controlled by the data gathered by the dialog box from the user. When applied to an IOAKAPI object, the Compare method performs a comparison between the workbook or worksheets specified by the parameters submitted to the method. |