Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comparing two excel files
#2
Solved: 10 Years, 9 Months, 1 Week ago
1,2,4 are very easy.I give you code for color comparison

Code:
Set ex=createobject("excel.application")
Set wb1=ex.workbooks.open("E:\Testing\Framework\Data\a.xls")
Set wb2=ex.workbooks.open("E:\Testing\Framework\Data\b.xls")

Set sh1=wb1.activesheet
Set sh2=wb2.activesheet

colorSame=true

For each c in sh1.usedrange
color1=c.font.color
color2=sh2.range(c.address).font.color

    If clng(color1)<>clng(color2)Then
        colorSame=false
    End If

Next


ex.quit

Set sh1=nothing
Set sh2=nothing

Set wb1=nothing
Set wb2=nothing

Set ex=nothing
Reply


Messages In This Thread
Comparing two excel files - by Sathiya - 09-26-2011, 12:25 PM
RE: Comparing two excel files - by rajpes - 09-26-2011, 03:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT taking different script execution timings while comparing 2 excel files. sudheer 0 2,219 06-26-2015, 03:28 PM
Last Post: sudheer
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,598 04-18-2014, 10:01 PM
Last Post: Parke
  Comparing two excel Sheets whose columns names vary Divya Roopa 2 8,290 03-26-2014, 07:20 PM
Last Post: Parke
  QTP Should open files(say txt files) it can be n number from a folder. Shiv Y 1 2,532 12-18-2013, 01:45 AM
Last Post: mlkrqtp
  Launch n-times QTP Test with different Excel Files nacchio 3 3,443 11-08-2011, 03:34 PM
Last Post: ravi.gajul

Forum Jump:


Users browsing this thread: 1 Guest(s)