LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing Html Source Part 2


A poster came up with this nice bit of code, but it seems if the source
code goes past 300 lines, it loops the first 300 lines several times:


Code:
--------------------


Sub Tester()
Range("a1").Value = GetSource("http://thewebpageyou wanthere")
End Sub


Function GetSource(sURL As String) As String

Dim oXHTTP As Object

Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
oXHTTP.Open "GET", sURL, False
oXHTTP.send
GetSource = oXHTTP.responsetext
Set oXHTTP = Nothing

End Function

Code:
--------------------


Also, note that A1 is the cell designated to receive the text. The code above attempts to place all the source into a single cell, which I think creates the problem. A smaller web page is manageable, but if the code goes too far past 300 lines then you run into this strange 'looping' thing mentioned above.

Is there some way to adjust that code to flow the source into the entire worksheet instead of stopping inside of one cell?

Thx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=503726

 
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
importing numbers from html-charts amsterdam-quick Charts and Charting in Excel 0 February 8th 07 07:04 PM
Importing HTML files Mary Ann Excel Discussion (Misc queries) 0 March 4th 06 09:51 AM
Importing HTML data into excel Mike Excel Discussion (Misc queries) 0 February 1st 06 02:51 AM
Importing multiple html tables into XL? RedFox Excel Discussion (Misc queries) 2 April 26th 05 06:44 AM
Importing multiple html tables into XL? RedFox New Users to Excel 2 April 26th 05 06:44 AM


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