Forum Discussion
- tristaanogreEsteemed 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(); }
- AlexKarasChampion Level 3
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.
- cunderwCommunity Hero
Test Complete provides several different ways to pull in data from excel files:
Related Content
- 2 years ago
- 5 years ago
- 2 years ago
- 4 years ago