here i have senario in which i need compare two excel files. I have actually written a code for that but the problem is for comparing 10 cells and 10 cols it is taking approximately 10-15mins, Is there any alternate to reduce the time for this comparison.
Because by using the macros in excel it is taking only 5 - 10 secs for the same comparison.
Thanks in advance...........
Re: Excel Compare
There can be many methods for Excel automation. If you already have a macro defined in your excel, then better try to call this macro from Qtp script. Below given some direction to call macro in excel from Qtp:
Set CONFIG_oXL = CreateObject("Excel.Application")
CONFIG_oXL.Visible = True
Set CONFIG_oWB = CONFIG_oXL.Workbooks.Open("C:/yourExcel.xls")
'' This excel is having the macro which defines a function 'MacroFunName'
'' Function MacroFunName (Par1, Par2)
'' ..............body of function...........
'' End Function
CONFIG_oXL.Run "MacroFunName", "Parameter1", "Parameter2"