Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Importing Soccer results from Internet Site

Hi,

I have recorded a basic Macro to import results from an internet site. (as
follows)

With Sheets("D.McDonald").Select
Cells.Select
Selection.ClearContents
With Activesheet.QueryTables.Add(Connection:= _
"URL;http://www.soccerbase.com/refs2.sd?refid=267&seasonid=137",
Destination _
:=Range("A1"))
.Name = "refs2.sd?refid=267&seasonid=137_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "5"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False

End With
End With

i have a problem with soccer results such as 2-1 showing as 02-Jan. Can I
add some code to rectify this problem?

Many thanks,

Jobber

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Importing Soccer results from Internet Site

Try changing

.WebDisableDateRecognition = False


to

.WebDisableDateRecognition = True

--
Regards,
Tom Ogilvy


"Jobber" wrote:

Hi,

I have recorded a basic Macro to import results from an internet site. (as
follows)

With Sheets("D.McDonald").Select
Cells.Select
Selection.ClearContents
With Activesheet.QueryTables.Add(Connection:= _
"URL;http://www.soccerbase.com/refs2.sd?refid=267&seasonid=137",
Destination _
:=Range("A1"))
.Name = "refs2.sd?refid=267&seasonid=137_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "5"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False

End With
End With

i have a problem with soccer results such as 2-1 showing as 02-Jan. Can I
add some code to rectify this problem?

Many thanks,

Jobber

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Importing Soccer results from Internet Site


Thanks.

It appears so obvious now.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Importing Soccer results from Internet Site

Indeed <g

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jobber" .(donotspam) wrote in message
...

Thanks.

It appears so obvious now.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Importing Soccer results from Internet Site

You could just add this at the end.


With ActiveSheet.Columns(3)
.NumberFormat = "d - m"
.HorizontalAlignment = xlLeft
End With

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jobber" .(donotspam) wrote in message
...
Hi,

I have recorded a basic Macro to import results from an internet site. (as
follows)

With Sheets("D.McDonald").Select
Cells.Select
Selection.ClearContents
With Activesheet.QueryTables.Add(Connection:= _
"URL;http://www.soccerbase.com/refs2.sd?refid=267&seasonid=137",
Destination _
:=Range("A1"))
.Name = "refs2.sd?refid=267&seasonid=137_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "5"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False

End With
End With

i have a problem with soccer results such as 2-1 showing as 02-Jan. Can I
add some code to rectify this problem?

Many thanks,

Jobber





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
Mon 1er message sur ce site internet faisant suite à des béné excavationfondations Excel Discussion (Misc queries) 0 September 2nd 10 11:18 PM
Link Excel with Internet explorer (particular site) through progra Vijay Kotian Excel Programming 0 May 8th 07 01:43 PM
internet explorer not able to open site Shelly Excel Discussion (Misc queries) 1 March 31st 06 01:44 AM
Download a CSV file from an internet site Microchip Excel Programming 0 March 28th 06 12:41 PM
Access a internet Web Site uisng a macro done with excel [email protected] Excel Programming 1 April 1st 04 05:14 AM


All times are GMT +1. The time now is 05:37 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"