07-27-2010, 05:55 PM
Hi,
I was able to get the values in the array but not write in excel.
Whenever i run the script it writes the first header in the excel many times but did not the next header.
The code is:
Please help me
Waiting for response.
Regards,
Anu
I was able to get the values in the array but not write in excel.
Whenever i run the script it writes the first header in the excel many times but did not the next header.
The code is:
Code:
Dim sHeaderArray(100)
For i = 0 to 10 'specify your limit for value of n
sHeaderArray(i)= Browser("IE").Page("Google Search").Link("LinkName").GetROProperty("innertext")
'Next
'msgbox(sHeaderArray(0))
'For Wirting in Excel Sheet’
Dim xlApp, xlBook, xlSheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.WorkBooks.Open("F:\Test.xls")
Set xlSheet = xlBook.WorkSheets("Sheet1")
''*** Writing Header***'
i = 0
For Each sHeader in sHeaderArray
i= i+ 1
xlSheet.Cells(1, i).Value = sHeaderArray
Next
Next
Please help me
Waiting for response.
Regards,
Anu