Forum Discussion
tristaanogre
7 years agoEsteemed Contributor
There's no built in utility to do what you're asking. There are script extensions available to compare two different files, but that's a bit of a different function than comparing two sheets within the same workbook.
Suggestion: Create two different DDT.ExcelDriver objects, one for each sheet. Build a while loop that loops both sheets, comparing column values as desired. It would be something like:
var sheet1Driver = DDT.ExcelDriver('C:\\MyFile.xls', 'Sheet1', true);
var sheet2Driver = DDT.ExcelDriver('C:\\MyFile.xls', 'Sheet2', true);
while ((!sheet1Driver.EOF()) && (!sheet2Driver.EOF()){
//Do your comparison stuff
sheet1Driver.Next();
sheet2Driver.Next();
}- AlexKaras7 years agoCommunity Hero
Hi,
As one more option, you may examine code of https://support.smartbear.com/viewarticle/42199/ or https://support.smartbear.com/viewarticle/9046/ script extension and modify it so it compares worksheets of the same file.