GC GYM Posted November 29, 2007 Share Posted November 29, 2007 Hi all I want to extract information from the web viewer. Stock prices to be exact. Following info from previous posts I've used GetLayoutObjectAttribute ("Webviewer" ; "Content") to put the content into a calc field (text). I was hoping to find and extract the numbers I wanted with another calc. like a filter or something. Any suggestions for how to get the 58.29 out of this... ......'>CBA58.290 and into my field? Thanks, Phil Link to comment Share on other sites More sharing options...
comment Posted November 29, 2007 Share Posted November 29, 2007 It may depend on what comes before. Is there anything in the quoted string that uniquely identifies the "58.290" value as the one you want? Link to comment Share on other sites More sharing options...
GC GYM Posted November 30, 2007 Author Share Posted November 30, 2007 Yes, the three letter code (in this case CBA) is the variable that should identify it as the right number. In this case I want to extract the 27th to 32nd characters following the occurrence of the unique three letter stock code. Link to comment Share on other sites More sharing options...
comment Posted November 30, 2007 Share Posted November 30, 2007 Well, if you can count on the website keeping it always in the exact same format, it can be simply: Let ( [ HTML = GetLayoutObjectAttribute ( "Webviewer" ; "Content" ) ; pos = Position ( HTML ; "CBA" ; 1 ; 1 ) ] ; Middle ( HTML ; pos + 30 ; 6 ) ) Link to comment Share on other sites More sharing options...
GC GYM Posted December 1, 2007 Author Share Posted December 1, 2007 Thanks for that - I'll give it a go! Phil Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6012 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now