Sorting Data in Microsoft Excel through QTP-QTP Script to Sort Data in excel sheet in Descending Order


Sorting Data in Microsoft Excel through QTP-QTP Script to Sort Data in excel sheet in Descending Order



Const xlDescending = 2

Const xlYes = 2

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Open("C:\qtp.xls")

Set objWorksheet = objWorkbook.Worksheets(1)

Set objRange = objWorksheet.UsedRange

Set objRange2 = objExcel.Range("A1")

objRange.Sort objRange2,xlDescending, , , , , , xlYes

No comments:

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge