Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write Heading in excel
#25
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Anu,

Try with the below code.

Note: Its written in Descriptive Prog., no need of adding objects in OR.
Directly copy below code > paste > Run > Check O/P in excel
Make sure excel file exist in the path "F\Test.xls"

Code:
Systemutil.Run "www.google.com"
Searched_Item="Page"
Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set Searched_Item
Browser("title:=Google").Page("title:=Google").WebButton("name:=Google Search").Click
Dim xlApp
Set xlApp=CreateObject("Excel.Application")
xlApp.WorkBooks.Open("C:\Documents and Settings\Sreee\Desktop\Test.xls")
xlApp.Sheets("Sheet1").Select
Set obj=description.Create
obj("micclass").Value="Link"
Set x=Browser("title:="&Searched_Item&" - Google Search").Page("title:="&Searched_Item&" - Google Search").ChildObjects(obj)
   temp=0
   For i=0 to x.count-1
        If (instr(1,x(i).GetROproperty("Innertext"),Searched_Item)>0) Then
              xlApp.Cells(1,temp+1).Value=(x(i).GetROproperty("Innertext"))
              xlApp.Cells(1,temp+1).font.Bold=True
              temp=temp+1
        End if
   Next
   xlApp.ActiveWorkBook.Save
   xlApp.Quit
   Set xlApp=Nothing
Reply


Messages In This Thread
Write Heading in excel - by Anu - 07-01-2010, 06:13 PM
RE: Write Heading in excel - by sreekanth chilam - 07-01-2010, 11:10 PM
RE: Write Heading in excel - by Anu - 07-12-2010, 01:37 PM
RE: Write Heading in excel - by basanth27 - 07-13-2010, 09:56 AM
RE: Write Heading in excel - by Anu - 07-13-2010, 02:34 PM
RE: Write Heading in excel - by sasmitakumari - 07-13-2010, 02:58 PM
RE: Write Heading in excel - by Anu - 07-26-2010, 11:40 AM
RE: Write Heading in excel - by sasmitakumari - 07-26-2010, 05:24 PM
RE: Write Heading in excel - by Anu - 07-26-2010, 05:35 PM
RE: Write Heading in excel - by sasmitakumari - 07-26-2010, 07:14 PM
RE: Write Heading in excel - by Anu - 07-27-2010, 11:13 AM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 11:27 AM
RE: Write Heading in excel - by Anu - 07-27-2010, 12:02 PM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 12:15 PM
RE: Write Heading in excel - by Anu - 07-27-2010, 12:27 PM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 01:01 PM
RE: Write Heading in excel - by Anu - 07-27-2010, 01:55 PM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 02:20 PM
RE: Write Heading in excel - by Anu - 07-27-2010, 02:23 PM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 02:55 PM
RE: Write Heading in excel - by Anu - 07-27-2010, 05:55 PM
RE: Write Heading in excel - by sasmitakumari - 07-27-2010, 08:21 PM
RE: Write Heading in excel - by Anu - 07-28-2010, 10:34 AM
RE: Write Heading in excel - by Anu - 07-30-2010, 11:46 AM
RE: Write Heading in excel - by sreekanth chilam - 07-30-2010, 03:33 PM
RE: Write Heading in excel - by MVChowdary - 07-30-2010, 07:23 PM
RE: Write Heading in excel - by Anu - 08-03-2010, 10:37 AM
RE: Write Heading in excel - by Anu - 08-05-2010, 03:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Write in Excel Continued Anu 3 3,315 08-27-2010, 08:53 AM
Last Post: basanth27
  Write in Excel Anu 48 31,561 08-25-2010, 06:08 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 3 Guest(s)