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: 6
Default Opening web documents as "text"

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

 
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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
disabling default "text to columns" while *.csv file opening vladdraco Setting up and Configuration of Excel 1 November 26th 08 02:00 PM
How do I move a document from "recent items" to "documents" John Gerke in Central Oregon New Users to Excel 1 March 2nd 08 08:31 AM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM
Opening text file in excel to maintain as "text" Eric[_6_] Excel Programming 3 June 30th 04 02:32 PM


All times are GMT +1. The time now is 03:44 AM.

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"