Solved

Extract Jave Applet live data into excel file by VBA

Posted on 2010-09-14
15
1,384 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
Comment Utility
Does the software itself not support saving data?
0
 
LVL 13

Author Comment

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

Author Comment

by:duncanb7
Comment Utility
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
 
LVL 13

Author Comment

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

Expert Comment

by:Valeri
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 13

Author Comment

by:duncanb7
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
>>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
Comment Utility
Okay, probably, you know what I need , I will contact you through your profile
0
 
LVL 13

Author Closing Comment

by:duncanb7
Comment Utility
THanks to all of you to help on
this email question
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

762 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

9 Experts available now in Live!

Get 1:1 Help Now