F
fisherofsouls
Hi,
I have a simple request which is driving me nuts ! I wonder if anyone
can help ?
My request is that I want to open HTML files on remote Web servers and
read the contents as text. That's it ! If I use the Workbooks.Open
Filename function, then Excel loads the page into a worksheet - this is
what I want to avoid. I would rather write some code to parse the HTML
text which makes up the content of the document. The Open function
just doesn't work on anything other than local files.
Essentially, I want to do exactly the same as the code snippet below,
but where sSource is:
"http://someserver.somewhere.com/example.htm"
rather than
"c:\example.htm"
Any help or advice would be greatly appreciated !
Regards
Nick
::CODE SNIPPET STARTS HERE
Sub Example_Code
Const sSource$ = "c:\example.htm"
Dim hFile as Integer
hFile = Freefile
Open sSource for Input Access Read Shared as #hFile
'Perform various operations on data held within file
Close #hFile
End Sub
::CODE SNIPPET ENDS HERE
I have a simple request which is driving me nuts ! I wonder if anyone
can help ?
My request is that I want to open HTML files on remote Web servers and
read the contents as text. That's it ! If I use the Workbooks.Open
Filename function, then Excel loads the page into a worksheet - this is
what I want to avoid. I would rather write some code to parse the HTML
text which makes up the content of the document. The Open function
just doesn't work on anything other than local files.
Essentially, I want to do exactly the same as the code snippet below,
but where sSource is:
"http://someserver.somewhere.com/example.htm"
rather than
"c:\example.htm"
Any help or advice would be greatly appreciated !
Regards
Nick
::CODE SNIPPET STARTS HERE
Sub Example_Code
Const sSource$ = "c:\example.htm"
Dim hFile as Integer
hFile = Freefile
Open sSource for Input Access Read Shared as #hFile
'Perform various operations on data held within file
Close #hFile
End Sub
::CODE SNIPPET ENDS HERE