Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular Expression Syntax
#35
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
Dim xlSheet,xlBook, xlApp,a,CustomerName,Address,datatable
Const ForAppending = 8
const TristateTrue=-1
file_location = "F:\Test.xlsx"


'----------'For Wirting in  Excel Sheet'

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.WorkBooks.Open("F:\Test.xlsx")
Set xlSheet = xlBook.WorkSheets("Sheet1")
Set oLinks = Description.Create
oLinks("micclass").Value = "Link"
oLinks("html tag").Value = "A"

Set AllLinks = Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").ChildObjects(oLinks)
nLinks =AllLinks.count
For i = 2 to nLinks
CountOfRows=Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("DataTable").WebTable("Table").RowCount

nRow = xlSheet.UsedRange.Rows.Count
For j = 1 To CountOfRows
'a=Browser("Untitled Page").Page("Untitled Page_3").WebTable("Data_Table").GetCellData(i,1)
CustomerName=Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("DataTable").WebTable("Table").GetCellData(i,3)
Address=Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("DataTable").WebTable("Table").GetCellData(i,4)
nRow = nRow + 1
xlSheet.Rows(nRow).Columns(1).Value =CustomerName
xlSheet.Rows(nRow).Columns(2).Value =Address
Next
oLinks("text").Value = i
Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("LinkTable").Link(oLinks).Click
Next
xlApp.DisplayAlerts = False
xlBook.Save
'xlBook.Close
xlApp.Quit
Set xlApp = Nothing
Set xlBook = Nothing
Set xlSheet = Nothing
Reply


Messages In This Thread
Regular Expression Syntax - by Anu - 05-25-2010, 10:24 AM
RE: Regular Expression Syntax - by Saket - 05-25-2010, 11:16 AM
RE: Regular Expression Syntax - by Anu - 05-25-2010, 12:26 PM
RE: Regular Expression Syntax - by Saket - 05-25-2010, 12:47 PM
RE: Regular Expression Syntax - by Anu - 05-25-2010, 02:00 PM
RE: Regular Expression Syntax - by Anu - 05-28-2010, 10:26 AM
RE: Regular Expression Syntax - by funajju - 05-28-2010, 11:42 AM
RE: Regular Expression Syntax - by Anu - 05-28-2010, 12:14 PM
RE: Regular Expression Syntax - by Saket - 05-28-2010, 12:45 PM
RE: Regular Expression Syntax - by Anu - 05-28-2010, 02:42 PM
RE: Regular Expression Syntax - by funajju - 05-28-2010, 02:58 PM
RE: Regular Expression Syntax - by Anu - 05-28-2010, 03:07 PM
RE: Regular Expression Syntax - by Saket - 05-29-2010, 03:11 PM
RE: Regular Expression Syntax - by Anu - 05-31-2010, 10:12 AM
RE: Regular Expression Syntax - by Saket - 05-31-2010, 10:17 AM
RE: Regular Expression Syntax - by Anu - 05-31-2010, 02:59 PM
RE: Regular Expression Syntax - by Saket - 06-01-2010, 09:38 AM
RE: Regular Expression Syntax - by Anu - 06-01-2010, 03:30 PM
RE: Regular Expression Syntax - by Saket - 06-02-2010, 11:02 AM
RE: Regular Expression Syntax - by Anu - 06-02-2010, 11:44 AM
RE: Regular Expression Syntax - by Saket - 06-02-2010, 11:47 AM
RE: Regular Expression Syntax - by Anu - 06-02-2010, 12:39 PM
RE: Regular Expression Syntax - by Anu - 06-02-2010, 12:46 PM
RE: Regular Expression Syntax - by Saket - 06-02-2010, 12:43 PM
RE: Regular Expression Syntax - by Saket - 06-03-2010, 10:12 AM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 11:12 AM
RE: Regular Expression Syntax - by Saket - 06-03-2010, 12:38 PM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 12:56 PM
RE: Regular Expression Syntax - by Saket - 06-03-2010, 01:16 PM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 02:11 PM
RE: Regular Expression Syntax - by Saket - 06-03-2010, 02:25 PM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 02:33 PM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 03:52 PM
RE: Regular Expression Syntax - by Saket - 06-03-2010, 03:54 PM
RE: Regular Expression Syntax - by Anu - 06-03-2010, 04:11 PM
RE: Regular Expression Syntax - by Anu - 06-04-2010, 11:31 AM
RE: Regular Expression Syntax - by Saket - 06-04-2010, 01:33 PM
RE: Regular Expression Syntax - by Anu - 06-04-2010, 06:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,495 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,361 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,830 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,576 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,123 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 6 Guest(s)