Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Extract Jave Applet live data into excel file by VBA

Posted on 2010-09-14
15
1,469 Views
Last Modified: 2012-05-10
Dear Expert,

I've purchased one stock price streaming data software with monthly fee. The software  doesn't provide the data to be stored
into excel format. Now I only know the live  price data is coming from Java Applet frame after looking into the software web page
original HTMl code. And  I know I could not use Web Query table
to extract the data. My question is there is any method  to extract the Java Applet live data into my excel file by VBA from Java .
SInce the live data is allowed to send to my computer with the license, I should be able to collect it by VBA programming. IS it easy
and possible ?

Please advise

Duncan




0
Comment
Question by:duncanb7
15 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 33671704
Does the software itself not support saving data?
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33671727
Yes, the software is only providing printing function and not file save
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33671752
Dear CEJI,

How are you,  talk you again.
I have looked into the website
http://www.experts-exchange.com/Programming/Languages/Java/Q_20671231.html?sfQueryTermInfo=1+10+30+applet+vba
Is it help to solve my question ?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 13

Author Comment

by:duncanb7
ID: 33671765
The data is only shown on the software application with Java Applet in stream
0
 
LVL 16

Expert Comment

by:Valeri
ID: 33671794
I think that it will be not so easy. You have to understan the way that the applet communicate with the server that provides the information. The only way to do that is to decompile the applet classes or to ask the provider for some specification and to write your own client that support export to excel as well.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33671814
You'll need to do a botch job if you need to do this at all - and it won't be much to do with Java. (Unless they've supplied you with the source)
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33671864
Dear All,

I have viewed the orginal code of the data webpage, and it is attached as follows, Is it any hint to solve mu question.

Please advised.


<style>
.applet_body 
{
  overflow:hidden;
}
</style>


<script language="JavaScript">
<!--

function open_applet(item){
	document.write(item);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d=document; 
	if(d.images)
	{ 
		if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0)
			{ 
				d.MM_p[j]=new Image; 
				d.MM_p[j++].src=a[i];
			}
	}
}



function MM_findObj(n, d) { //v3.0
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) 
	{
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
  
	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=MM_findObj(n,d.layers[i].document); 
		
	return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null)
		{
			document.MM_sr[j++]=x; 
			if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
		}
}


function setCookie(name, value, path) {
	document.cookie = name + "=" + escape(value) + ";domain=.dowstocks.com;path=/";
	document.cookie = name + "=" + escape(value) + ";path=/";
}

function CheckSymbol(symbol) {
  symbol = symbol.toUpperCase();
  var re = new RegExp("^\\d{1,6}$");
  var bResult = re.test(symbol);
  if (bResult)
	return 1;
  else
  	return 0;  
}
//-->
</script>


	<link rel=stylesheet href="../font1.css">

<script language="javascript">
function printChart(url, type, lang)
{
var plink = 'http://www.dowstocks.com/pkages/futurewinner/'+lang+'/printchart.asp?siz=1&type='+type;
var PopupWindow = window.open(plink,'PrintChartWindow','height=470,width=710,status=no,location=no,toolbar=yes,menubar=yes,resizable=yes,scrollbars=yes,dependent=yes,alwaysRaised=yes,left=0,top=0",screenX=0,screenY=0');
PopupWindow.focus();
}
</script>
<html>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
<head>
<title>dowstocks.com</title>
</head>
<script src="../../include/include.asp"></script>
<body bgcolor="#e7f6ff" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" TEXT="#000000" ALINK="#003399" LINK="#003399" VLINK="#003399" class="applet_body">
<table CELLPADDING="0" CELLSPACING="0" WIDTH="100%" BORDER="0" align="center" height=100%>
<tr><td valign=top>
	
	<script language="javascript">
	open_applet('<applet code="a.b.l.a.class" codebase="http://data1.dowstocks.com/quotewinner/applet/" name=AAFullVersion width="100%" height="100%" MAYSCRIPT VIEWASTEXT>');
	</script>
		
			<param name=cabbase value="TeletextProj20.cab">
			<PARAM NAME="archive" VALUE="TeletextProj20.jar">

		
		<param name="Language" 		value="chi">
	
		<param name="OPTION"		value="1">
		<param name="OPTION_DEPTH"	value="">
		<param name="FUTURE"		value="1">
		<param name="FUTURE_DEPTH"	value="">
		<param name="STK_OPT"       value="1">
        <param name="STK_OPT_DEPTH" value="">
	</applet></td></tr>
</table>

</body>
</html>

Open in new window

0
 
LVL 13

Author Comment

by:duncanb7
ID: 33671884
The live data is shown as table format, Maybe let me try to use WebQuery table in excel VBA to extract data.
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 33672401
if its applet, no way you can access unless the applet provides API.
one akward way, is to print to file option in the print dialog if its enabled!
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33673413
I tried querytabe that doesn't work and extract blank data.
In the software, they only allows you to save the stocks, and
the data is blank in print file  after using print option
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33673426
Sorry typing mistakes

I tried querytabe that doesn't work and extract blank data.
In the software, they only allows you to save the stocks graphic chart , and
the data is blank in print file  after using print optionAccept and Award Points Accept as Solution
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33673567
Dear all

DO you think there is another software  or company could  provide service to
extract live stock data into excel format for anlaysis . Since the live data  transmitted  to client side
should come to website data protocol coding standard in this world whatever using Applet or not.
The question is there is any software is available for the extraction service

Please advise


0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 33673833
>>DO you think there is another software  or company could  provide service to extract live stock data into excel format for anlaysis.

We could discuss this offsite if you'd like to get in touch via my profile
0
 
LVL 13

Author Comment

by:duncanb7
ID: 33673959
Okay, probably, you know what I need , I will contact you through your profile
0
 
LVL 13

Author Closing Comment

by:duncanb7
ID: 33673974
THanks to all of you to help on
this email question
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 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