Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Excel to report the TITLE of a webpage?

Hi,

I have a list of a large number of addresses from a UK news website in a
Excel sheet.

e.g.

http://......./england/kent/485276.stm
http://......./england/kent/485277.stm
http://......./england/kent/485278.stm

etc. etc.

These are down in a column (A1....A800+). As I'm trying to pick out
particular news items, I need a function to return just the content of the
hypertext element "<TITLE". Is there an already defined Excel function that
could do this, or do I need to explore the delights of VBA, which I'm new
to?

Any ideas or help?

Many thanks,

Steve


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Using Excel to report the TITLE of a webpage?

Hi Steve,

I don't know of a built-in function to do this. You can do this by
automating IE in a user-defined function (open the VBE with Alt+F11, insert
a new standard module, and paste in this code):

Public Function GETURLPAGETITLE(sURL As String) As String
Dim ie As Object

Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate sURL
Do Until ie.ReadyState = 4
DoEvents
Loop

GETURLPAGETITLE = ie.Document.Title

ie.Quit
Set ie = Nothing
End Function

Then, in your cell, you could use a formula like this:

=geturlpagetitle(A1)

Since you have tons of URLs to get the titles for, you may want to keep IE
open the whole time instead of opening it, navigating to the URL, and
closing it like I'm doing in this function. So a script to run through your
list, navigating to each page, and writing out the titles as you go would be
more efficient.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


uP..AND..DOWn wrote:
Hi,

I have a list of a large number of addresses from a UK news website
in a Excel sheet.

e.g.

http://......./england/kent/485276.stm
http://......./england/kent/485277.stm
http://......./england/kent/485278.stm

etc. etc.

These are down in a column (A1....A800+). As I'm trying to pick out
particular news items, I need a function to return just the content
of the hypertext element "<TITLE". Is there an already defined Excel
function that could do this, or do I need to explore the delights of
VBA, which I'm new to?

Any ideas or help?

Many thanks,

Steve



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
How do I change an Excel report title that shows in top left corn. DonnLee Excel Discussion (Misc queries) 3 January 29th 10 04:15 PM
Excel on Webpage Caz Excel Discussion (Misc queries) 0 March 1st 08 03:50 AM
Automate Excel report to place certain data into existing report? Craig Harrison Excel Worksheet Functions 3 July 25th 06 01:54 PM
Named range=Column title,comumn title in cellB6 use B6in equation Graham Excel Discussion (Misc queries) 2 July 21st 06 10:03 AM
Webpage/excel? Stephan Kassanke Excel Programming 0 March 1st 04 08:34 PM


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