Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
hp hp is offline
external usenet poster
 
Posts: 13
Default inporting data from website where website address frequently chang

Hello, thanks in advance for your help.

I need to finish a macro that opens "get external data"/"import data"/ and
then places the website typed into the 'myinput' field into the field box.



The website has different pages for the same type data.

http://www.website.org/app.php?page=...about&id=99999

I know it's something regarding that "FINDER: @@@" statement.

Here's where i'm at:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/21/2007 by me
'
Dim Website
Website = InputBox("Enter the Address of the site")

'
Range("C117").Select
ActiveWindow.SmallScroll Down:=-3
ActiveWindow.LargeScroll Down:=-3
Range("A1").Select
Sheets("Sheet2").Select
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _

"FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999", _
Destination:=Range("A1"))
.Name = "app.php?page=businesses&action=about&id=99999 "
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default inporting data from website where website address frequently chang

IF??? you are trying to change the url, use a variable

Sub GetUrl()
Website = InputBox("Enter the Address of the site")
'assuming answer is 99999 you would get
'http://www.website.org/app.php?page=businesses&action=about&id=99999

murl="http://www.website.org/app.php?page=businesses&action=about&id="&
website
ActiveWorkbook.Worksheets.Add
With ActiveSheet..QueryTables.Add( _
Connection:="URL;" & myurl, Destination:=.Cells(1, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
end sub

If not, you may change url strings
"http://www.website"&xxxxxxxxxx&"bbbbbbbb"
--
Don Guillett
SalesAid Software

"HP" wrote in message
...
Hello, thanks in advance for your help.

I need to finish a macro that opens "get external data"/"import data"/ and
then places the website typed into the 'myinput' field into the field box.



The website has different pages for the same type data.

http://www.website.org/app.php?page=...about&id=99999

I know it's something regarding that "FINDER: @@@" statement.

Here's where i'm at:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/21/2007 by me
'
Dim Website
Website = InputBox("Enter the Address of the site")

'
Range("C117").Select
ActiveWindow.SmallScroll Down:=-3
ActiveWindow.LargeScroll Down:=-3
Range("A1").Select
Sheets("Sheet2").Select
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _

"FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999",
_
Destination:=Range("A1"))
.Name = "app.php?page=businesses&action=about&id=99999 "
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
hp hp is offline
external usenet poster
 
Posts: 13
Default inporting data from website where website address frequently c

THANK YOU DON! with a few changes it worked, thanks!!!!!!

"Don Guillett" wrote:

IF??? you are trying to change the url, use a variable

Sub GetUrl()
Website = InputBox("Enter the Address of the site")
'assuming answer is 99999 you would get
'http://www.website.org/app.php?page=businesses&action=about&id=99999

murl="http://www.website.org/app.php?page=businesses&action=about&id="&
website
ActiveWorkbook.Worksheets.Add
With ActiveSheet..QueryTables.Add( _
Connection:="URL;" & myurl, Destination:=.Cells(1, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
end sub

If not, you may change url strings
"http://www.website"&xxxxxxxxxx&"bbbbbbbb"
--
Don Guillett
SalesAid Software

"HP" wrote in message
...
Hello, thanks in advance for your help.

I need to finish a macro that opens "get external data"/"import data"/ and
then places the website typed into the 'myinput' field into the field box.



The website has different pages for the same type data.

http://www.website.org/app.php?page=...about&id=99999

I know it's something regarding that "FINDER: @@@" statement.

Here's where i'm at:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/21/2007 by me
'
Dim Website
Website = InputBox("Enter the Address of the site")

'
Range("C117").Select
ActiveWindow.SmallScroll Down:=-3
ActiveWindow.LargeScroll Down:=-3
Range("A1").Select
Sheets("Sheet2").Select
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _

"FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999",
_
Destination:=Range("A1"))
.Name = "app.php?page=businesses&action=about&id=99999 "
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default inporting data from website where website address frequently c


Glad to help. Always nice to publish your final result for archival purposes

--
Don Guillett
SalesAid Software

"HP" wrote in message
...
THANK YOU DON! with a few changes it worked, thanks!!!!!!

"Don Guillett" wrote:

IF??? you are trying to change the url, use a variable

Sub GetUrl()
Website = InputBox("Enter the Address of the site")
'assuming answer is 99999 you would get
'http://www.website.org/app.php?page=businesses&action=about&id=99999

murl="http://www.website.org/app.php?page=businesses&action=about&id="&
website
ActiveWorkbook.Worksheets.Add
With ActiveSheet..QueryTables.Add( _
Connection:="URL;" & myurl, Destination:=.Cells(1, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
end sub

If not, you may change url strings
"http://www.website"&xxxxxxxxxx&"bbbbbbbb"
--
Don Guillett
SalesAid Software

"HP" wrote in message
...
Hello, thanks in advance for your help.

I need to finish a macro that opens "get external data"/"import data"/
and
then places the website typed into the 'myinput' field into the field
box.



The website has different pages for the same type data.

http://www.website.org/app.php?page=...about&id=99999

I know it's something regarding that "FINDER: @@@" statement.

Here's where i'm at:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/21/2007 by me
'
Dim Website
Website = InputBox("Enter the Address of the site")

'
Range("C117").Select
ActiveWindow.SmallScroll Down:=-3
ActiveWindow.LargeScroll Down:=-3
Range("A1").Select
Sheets("Sheet2").Select
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _

"FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999",
_
Destination:=Range("A1"))
.Name = "app.php?page=businesses&action=about&id=99999 "
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
grabbing data from another website [email protected] Excel Discussion (Misc queries) 1 July 4th 08 08:26 PM
How to extract one data from a website Lamb Chop[_2_] Excel Discussion (Misc queries) 1 June 20th 08 02:19 PM
Import data from a website to excel marsocgm Excel Worksheet Functions 1 July 10th 07 03:45 PM
Copy Data from Website J.W. Aldridge Excel Programming 1 March 1st 07 12:49 AM
Download data from website Sanjay Singh Excel Programming 3 April 21st 04 10:39 PM


All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"