Can VB THIS EXCEL MACRO vb CODE BE CONVERTED INTO JAVA
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rahul_Kumar
Posted On:   Tuesday, April 28, 2009 01:35 AM

tHIS IS AN CODE TO EXTRACT DATA FORM THE WEB SITE CAN IT BE CONVERTED TO JAVA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Sub Test() Dim Sh As Worksheet Dim Rng As Range Dim ShNew As Worksheet Dim r As Integer Dim Cell As Range Dim URL As String Set Sh = Worksheets("Sheet1") With Sh Set Rng = .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row) End With Set ShNew = Worksheets.Add r = 1 For Each Cell In Rng URL = "URL;http://www.firstflight.net/n_contrac_new.asp?tracking1=" & Cell.Value With ShNew.QueryTables.Add(Connection:=URL, Destination:=ShNew.Cells(r, 1))    More>>

tHIS IS AN CODE TO EXTRACT DATA FORM THE WEB SITE CAN IT BE CONVERTED TO JAVA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sub Test()
Dim Sh As Worksheet
Dim Rng As Range
Dim ShNew As Worksheet
Dim r As Integer
Dim Cell As Range
Dim URL As String
Set Sh = Worksheets("Sheet1")
With Sh
Set Rng = .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row)
End With
Set ShNew = Worksheets.Add
r = 1
For Each Cell In Rng
URL = "URL;http://www.firstflight.net/n_contrac_new.asp?tracking1=" & Cell.Value
With ShNew.QueryTables.Add(Connection:=URL, Destination:=ShNew.Cells(r, 1))
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "21"
.Refresh BackgroundQuery:=False
End With
With ActiveSheet
.QueryTables(1).Delete
.Cells(r, 1).Resize(3).EntireRow.Delete
End With
r = r + 1
Next Cell
End Sub
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

   <<Less
About | Sitemap | Contact