Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Row count is always shown as 1
#1
Not Solved
Hi,

I am writing a piece of code to copy data from a web table to an excel sheet. I don't understand why I am getting row count and column count 1. Is there something else that I need to add?

Here is my code:

Dim XL
Set XL=createobject("Excel.Application")
XL.Workbooks.Open "D:\QTP\RailwaysforSurat.xlsx"
Set nsheet = XL.Sheets.Item(1)
row=Browser("title:=.*").Page("title:=.*").WebTable("html tag:=TABLE", "index:=0").GetROProperty("rows")
msgbox row
cols=Browser("title:=.*").Page("title:=.*").WebTable("html tag:=TABLE", "index:=1").GetROProperty("cols")
msgbox cols



This not complete code. I have trouble getting rows and columns count. Please help!

Thanks,
Harry

P.S. I am using this website for the testing "http://www.indianrail.gov.in/cgi_bin/inet_trnnum_cgi.cgi"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DataGrid: double click on selected row robertosalemi 0 4,463 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Keep row number imbizile 0 2,771 09-18-2014, 03:31 AM
Last Post: imbizile
  Retrieve row number based on value in DataTable marfa 6 30,916 07-31-2014, 08:36 PM
Last Post: dharshinishankari@gmail.com
  The recorded text output not appear on the correct row on the results datatable trance07 0 2,294 09-25-2013, 08:05 PM
Last Post: trance07
  How to add new row and select next dropdown pat_stan 2 3,596 10-29-2012, 12:14 PM
Last Post: krr

Forum Jump:


Users browsing this thread: 2 Guest(s)