Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default HTML Text retrieval

Am using Joels dump sub to retrieve location of text (a persons date of
birth) within a web page, all I get from the dump is:

HTML
HEAD
TITLE
FRAMESET
FRAME
FRAME
FRAME
I have tried returning Frame.item(0).innertext item1 item 2 etc but get no
innertext.
any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


Not all object have innertext. I suspect the FRAME is really another
webpage that the Java code is download and displaying. I would loolk at
the source code and see if there is a href property associate with the
object. You can add the href into the dump and put the data in a
different column. Without seeing the webpage I can't tell what is
happening. If you are using IEversion 7 or 8 you can look at the
developers tool (F12) or look at the source code to get a clue (menu
view - source).

I have had to open a second IE explorer and go tthe webpage that was
referenced by the href to get the data in a 2nd frame.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default HTML Text retrieval

not much in the way of source code:
<frameset rows="175,30,*" frameborder="NO" border="0" framespacing="0"
cols="*"

<frame name="fraSUTop" scrolling="NO"
src="SU_top.asp?patient=890634&iSpell=&uStatus=act ive&mode=active&Timeline="


<frame name="fraSUMiddle" scrolling="NO"
src="SU_middle.asp?patient=890634&iSpell=&uStatus= active&mode=active&form=&letter="
<frame name="fraSUBottom"
src="SU_bottom.asp?mds=&np=&patient=890634&iSpell= &uStatus=active&mode=active&form=&formid=&id=&lett er="
</frameset
<noframes


</noframes
</html
any ideas?

"joel" wrote:


Not all object have innertext. I suspect the FRAME is really another
webpage that the Java code is download and displaying. I would loolk at
the source code and see if there is a href property associate with the
object. You can add the href into the dump and put the data in a
different column. Without seeing the webpage I can't tell what is
happening. If you are using IEversion 7 or 8 you can look at the
developers tool (F12) or look at the source code to get a clue (menu
view - source).

I have had to open a second IE explorer and go tthe webpage that was
referenced by the href to get the data in a 2nd frame.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


The frames are just spliting the IE window frame into 3 pieces and is
not the object that contains the text. I would open the webpage without
the VBA code by typing the URL into an explorer address box. the go to
the developers tool by type F12. there is a search box in the upper
right corner of the developers tool. Type a string from the portion
webpage that you are looking for into the seatch box. The developer
tool should find where in the webpage the string is located. For some
reason the Search doesn't work when excel is connected to the webpage.
Not sure why

You can also do the same thing using the view - source menu (but
sometimes you can't find it in the source).


Once you find the string then look for a tag (in angle brackect like
<abc or an ID="abc". Look for the tag or the ID before the string you
are looking for.

You can get the ID object using this. the ID in the source code is
returned from the below statement. You could have the same id occor
multiple times and set varialbe would be an aray.

Set abc = IE.document.getelementbyid("abc")


You can get the tag like this

You can get the tag object using this. The tag in the source code is
returned from the below statement. You could have the same id occor
multiple times and set varialbe would be an aray.

Set abc = IE.document.getelementsbytagname("abc")


Some times the object is a child of the object you are looking for. I
often put the SEt variable in a watch window in VBA by hightlighting the
variable (like abc) in the VBA window. then right click the highlighted
variable and select Watch. Press OK in the pop up window. then you can
press the plus sign in the watch window to see all the properties. If
you don't find the text in the innertext property look for an item and
the end of the properties or lokk at the childnoes. If the object is a
table then look under the property rows and to get the columns under
rows look for cells.


I found case like I mentioned before that the data came from another
webpage under the href property. Text cna be found in one of 4
properties

innertext
innerhtml
outertext
outerhtml.

The case where it came from another webpage the text was put into the
innerhtml property. Instead of pasing the string from the innerhtml it
was easier to go to the 2nd webpage to get the data.

In your case there is an application running which is putting the data
into the frames. The data is coming from the SU_top.asp, SU_middle.asp,
and SU_bottom.asp. You data is propably in the Frame as either the
innerhtml or outerhtml and may not be easily extracted. It would be
better to get a different object which contains the text.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default HTML Text retrieval

To reach an element in a frame:

document.frames("fraSUMiddle").document.getelement byid("blah")

Tim


"Atishoo" wrote in message
...
not much in the way of source code:
<frameset rows="175,30,*" frameborder="NO" border="0" framespacing="0"
cols="*"

<frame name="fraSUTop" scrolling="NO"
src="SU_top.asp?patient=890634&iSpell=&uStatus=act ive&mode=active&Timeline="


<frame name="fraSUMiddle" scrolling="NO"
src="SU_middle.asp?patient=890634&iSpell=&uStatus= active&mode=active&form=&letter="

<frame name="fraSUBottom"
src="SU_bottom.asp?mds=&np=&patient=890634&iSpell= &uStatus=active&mode=active&form=&formid=&id=&lett er="

</frameset
<noframes


</noframes
</html
any ideas?

"joel" wrote:


Not all object have innertext. I suspect the FRAME is really another
webpage that the Java code is download and displaying. I would loolk at
the source code and see if there is a href property associate with the
object. You can add the href into the dump and put the data in a
different column. Without seeing the webpage I can't tell what is
happening. If you are using IEversion 7 or 8 you can look at the
developers tool (F12) or look at the source code to get a clue (menu
view - source).

I have had to open a second IE explorer and go tthe webpage that was
referenced by the href to get the data in a 2nd frame.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


Tim: Don't you need the IE object?


IE.document.frames("fraSUMiddle").document.getelem entbyid("blah")


Atishoo still needs to find the object.

I would put the outertext.html in to a cell like this

Range("A1") = IE.document.frames("fraSUMiddle").innerhtml

or

Range("A1") = IE.document.frames("fraSUMiddle").outerhtml



Then copy the cell into Notepad and look at the data to find either a
TAG or ID associated with data Atishoo is looking for.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default HTML Text retrieval

That was implied: the aim was to show how to access the frame content.

Tim

"joel" wrote in message
...

Tim: Don't you need the IE object?


IE.document.frames("fraSUMiddle").document.getelem entbyid("blah")


Atishoo still needs to find the object.

I would put the outertext.html in to a cell like this

Range("A1") = IE.document.frames("fraSUMiddle").innerhtml

or

Range("A1") = IE.document.frames("fraSUMiddle").outerhtml



Then copy the cell into Notepad and look at the data to find either a
TAG or ID associated with data Atishoo is looking for.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


You have to be aware of the person skill level in answering questions.
I've learned from experience with these posting assume nothing unless
you dealt with a person before when answering a question. Answering a
question without enough info leads to a lot of responses.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default HTML Text retrieval

Umm, thanks. I prefer the indirect giving of fish.

Tim

"joel" wrote in message
...

You have to be aware of the person skill level in answering questions.
I've learned from experience with these posting assume nothing unless
you dealt with a person before when answering a question. Answering a
question without enough info leads to a lot of responses.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


Don't you prefer to come out smelling like roses than stinking of fish?


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default HTML Text retrieval

There is a fine line between fishing and just standing on the shore like a
jerk!

"joel" wrote:


Don't you prefer to come out smelling like roses than stinking of fish?


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

.

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HTML Text retrieval


Yeh! The fine line is being successful and catching the fish. I have
spent plenty of days watching the guy next to me catching and me not
catching, and then being the guy who caught the fish with everybody else
watching. sometimes it just luck but you want to always do everything
you can to improve the odds.

Atishoo;589540 Wrote:
There is a fine line between fishing and just standing on the shore like
a
jerk!

"joel" wrote:


Don't you prefer to come out smelling like roses than stinking of

fish?


--
joel

------------------------------------------------------------------------
joel's Profile: 229
View this thread: 'HTML Text retrieval - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...d.php?t=161953)

'Microsoft Office Help' (http://www.thecodecage.com)

.



--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161953

Microsoft Office Help

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
Paste as text not HTML RealGomer Excel Discussion (Misc queries) 0 November 18th 09 03:55 PM
how do i transfer html text to standard text? kathryn whittaker Excel Discussion (Misc queries) 1 September 18th 07 01:45 PM
Get text from a Html form josuegm Excel Programming 5 May 26th 06 12:26 AM
HTML data retrieval bspar Excel Programming 0 May 17th 04 08:07 PM
Excel/Text to HTML using ASP shiime Excel Programming 6 April 28th 04 09:12 PM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"