+ Reply to Thread
Results 1 to 3 of 3

Error Opening dynamic website as text stream

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Exclamation Error Opening dynamic website as text stream

    Hi,

    I am trying to write the contents of a dynamic website (I guess it's PHP or something similar) into a worksheet
    I attempted to open as text stream the URL of the website, but the previous step of getFile does not work

    any other way around to achieve what I am trying to do?

    excel2003 by the way


    '2013-10-25 / B.Agullo /
    Public Sub checkDANs()
    'description here
        
        Dim webSt As String
        
        webSt = GetBoiler("http://*******/DAN?OpenView")
        
    End Sub
    and Getboiler I got somewhere

    Function GetBoiler(ByVal sFile As String) As String
    '**** Kusleika http://www.rondebruin.nl/mail/folder3/signature.htm
        Dim FSO As Object
        Dim TS As Object
        Set FSO = CreateObject("Scripting.FileSystemObject")
        Set TS = FSO.GetFile(sFile).OpenAsTextStream(1, -2)
        GetBoiler = TS.ReadAll
        TS.Close
    End Function
    thank you!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Error Opening dynamic website as text stream

    Not exactly sure what you are trying to get but maybe:
    Function GetBoiler1(ByVal sfileURL As String) As String
    With CreateObject("msxml2.xmlhttp")
        .Open "GET", sfileURL, False
        .send
        GetBoiler1 = .responsetext
    End With
    End Function
    Sub checkDANs1()
    Dim webst As String
    webst = GetBoiler1("http://oem.aafgb.com/quotes/view/quote-data/")
    End Sub

  3. #3
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Re: Error Opening dynamic website as text stream

    awesome!

    worked like a charm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opening website, getting data, closing website
    By beta_leonis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 03:50 AM
  2. [SOLVED] A whole AND exact key word match in a large text stream
    By ddgacic in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 06-11-2012, 05:39 AM
  3. Error while opening Excel file from website
    By BBorawski in forum Excel General
    Replies: 0
    Last Post: 09-17-2009, 01:53 PM
  4. stream read error
    By bembaman in forum Excel General
    Replies: 3
    Last Post: 12-23-2005, 01:00 AM
  5. [SOLVED] Writing text string with imbedded quotes to a text stream
    By John Wirt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2005, 09:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1