GC GYM Posted November 29, 2007 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
comment Posted November 29, 2007 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?
GC GYM Posted November 30, 2007 Author 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.
comment Posted November 30, 2007 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 ) )
GC GYM Posted December 1, 2007 Author Posted December 1, 2007 Thanks for that - I'll give it a go! Phil
Recommended Posts
This topic is 6214 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