Solved

How to collect stream tick stock data in IE by VBA

Posted on 2010-09-14
5
873 Views
Last Modified: 2012-05-10
Dear Expert,

I get one stock software Java Applet application running in IE 7, and I know a little of
internet data extraction and Java Applet programming. Now I try to use VBA to
start my project to collect the live data in every minutes into excel file format.
In the market, there is a lot of company provide this kind of service such as the following website
http://www.analyzerxl.com/qtxl.htm, but its target data extraction website is assigned in certain or destinated website address only. It is not helping me at all. SO I try to write the VBA program instead.
First of above, I will  use nagviate to locate my website and activate the software application in
the IE instance or window and I found the difficuity to collect the data becase it is Java Script
for Java Applet  and it is not easier than collecting table or data from HTML document using
ie.document.getelementbytage or Webquery Excel table. Anyone is familar with the data
collection in IE  by VBA, please advise and help on it

Please advise

DUncan





Sub loginonly()

Dim myIE As SHDocVw.InternetExplorer

Set myIE = Nothing

Set myIE = CreateObject("InternetExplorer.Application")

With myIE

 .Visible = True

.navigate "https://www.dowstock.com.hk/nfs/login.htm?lang=zh_US"

Call WAITING(myIE, 10)

.document.all("j_username").Value = "username"

.document.all("j_password").Value = "passwrod"

.document.all("login").Click

Call WAITING(myIE, 10)



.document.Links(50).Click  ' To activate the stock live Java Applet application in the same IE

Window 

Call WAITING(myIE, 11)

.ie.document,getelementby ''Try to write a code for data collection



Function WAITING(ByRef myIE As SHDocVw.InternetExplorer, state1 As Integer)

With myIE

        

    Do Until Not .Busy And .readyState = READYSTATE_COMPLETE

       

        ' Debug.Print state1' Debug.Print .Busy ' Debug.Print .readyState

        'Sleep (300)

    Loop

    

    

 End With

End Function

Open in new window

0
Comment
Question by:duncanb7
  • 3
5 Comments
 
LVL 13

Expert Comment

by:Surone1
Comment Utility
without seeing the source for that page i cannot be certain. but if the ticker data is shown by a java applet it's probably impossible to have ie retrieve it.
0
 
LVL 13

Author Comment

by:duncanb7
Comment Utility
It is Java Applet application data , but why impossible , it should be okay if I can read the data in
my computer. Whether the protocol data format transmit in web by Java Applet is defined by
software company? It should be  same data format for client collect like IE could read
the data and shown it in IE windows no matter it is Java Applet or not

Please read the the source code of the web page and advise

Thanks

Duncan
stockfuture-1-.txt
0
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
Comment Utility
Duncan

I don't know if it's strictly impossible but I'm pretty sure you can't do it in a similar way you would get data from a webpage.

You say that you can read the data somehow, how exactly?

I don't actually know why you are surprised that this isn't straightforward and how the source code of the web page can help.

I've looked at the code and it doesn't really give much away, as far as I can see the only relevant code is for displaying the applet.

All the other code appears to be for other elements on the page.

Have you considered some other method to get the data you want?
0
 
LVL 13

Author Comment

by:duncanb7
Comment Utility
Yes, you are right, after talking to other experts, it is impossible to extract the Applet data except
we have the actual source code of Java Applet program from the data provider that will help to know
the data format to send to the client 's computer.

0
 
LVL 13

Author Closing Comment

by:duncanb7
Comment Utility
Thanks for allof you to reply
the question
Duncan
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now