12-18-2015, 01:47 PM
(This post was last modified: 12-18-2015, 02:02 PM by vinod123.
Edit Reason: Changing the script example
)
Code:
Dim Rowcount, webrowcnt
Rowcount=datatable.getsheet"Sheet name".GetRowCount
For i=1 to Rowcount
Datatable.GetSheet"Sheet name".SetCurrentRow(i)
Browser("").Page("").Link("").Click
Browser("").Page("").WebEdit("").Set DataTable("Row1", dtLocalSheet)
Browser("").Page("").WebButton("").Click
webrowcnt=Browser("").Page("").WebTable("").RowCount
For n=3 to webrowcnt (note: n=3 because the data I need starts on row 3)
If webrowcnt > 3 Then (note: this is where I want it to create a new row if there is more than 3 rows of data)
For i=4 to webrowcnt
some code here to create however many rows of data the account number has.
Next
End If
column1 = Browser("").Page("").WebTable("").GetCellData(n, 1)
DataTable("column1", dtLocalSheet)=column1
column2 = Browser("").Page("").WebTable("").GetCellData(n, 2)
DataTable("column2", dtLocalSheet)=column2
column3 = Browser("").Page("").WebTable("").GetCellData(n, 3)
DataTable("column3", dtLocalSheet)=column3
column4 = Browser("").Page("").WebTable("").GetCellData(n, 4)
DataTable("column4", dtLocalSheet)=column4
column5 = Browser("").Page("").WebTable("").GetCellData(n, 5)
DataTable("column5", dtLocalSheet)=column5
column6 = Browser("").Page("").WebTable("").GetCellData(n, 6)
DataTable("column6", dtLocalSheet)=column6
Browser("").Page("").Link("").click (note: link to return to home page to restart on new account number)
Next