Actually i have 84459 data and also it is not fixed.
Depending on my query in the site it produces result.........
So please correct in my code itself because if i use my code then the QTP runs fast.
It will keep on fetching the records from web table to data table.
Browser("xxxxxxxxxxxx').Page("xxxx").WebTable("xxxxxxxxx").GetRoproperty("rows") will fetch 844559 so you no need to worry how much count the only concern is if you more no of record then it will take more time to fetch all records to excel
And thats the reason i have given somme logic to click "Next" link to fetch all the data.
So first please try and let me know if you face any issues.
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.WorkBooks.Open("C:\Test.xlsx")
Set xlSheet = xlBook.WorkSheets("Sheet1")
'To add the column names "Name","Address" for the data table.
Datatable.AddParameter("CustonerName"),Global Sheet)
Datatable.AddParameter("Address"),Global Sheet)
'To fetch the row count from the web table
intrcount=Browser("Browser").Page("Page").WebTable("DataTable").WebTable("Table").GetRoProperty("eows")
For temp=1 to intrcount-1 step 1
Datatable.setcurrentrow(temp)
strcustname=Browser("Browser").Page("Page").WebTable("DataTable").WebTable("Table").GetCellData(temp,"Name")
straddress=Browser("Browser").Page("Page").WebTable("DataTable").WebTable("Table").GetCellData(temp,"Address")
strcustname=Datatable.Value("Name")
straddress=Datatable.Value("Address")
'To click the Next page
If ((temp%10)=0) Then
Browser("Browser").Page("Page").WebTable("DataTable").WebTable("Table").Link("Next").Click
Browser("Browser").Page("Page").Sync
Wait 2
End If
Next
Wait 3
Datatable.Export "C:\Test.xlsx"
xlApp.DisplayAlerts = False
xlBook.Save
'xlBook.Close
xlApp.Quit
Set xlApp = Nothing
Set xlBook = Nothing
Set xlSheet = Nothing
But it is throwing a syntax error while executing this "Datatable.AddParameter("CustonerName"),Global Sheet)"