[LON-CAPA-users] Returning data from excel?

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Mon, 21 May 2007 12:55:07 -0400 (EDT)

Hi Brew,

> I am trying to return a string from an Excel spreadsheet to a
> LonCapa problem. I see how James Sullivan is doing this in
> Java, using the construct
> eval("opener.document.forms.lonhomework.HWVAL_"+responseid+".value="+string);

Well this isn't the important line from his problem. The important
line is the one that sets the value of the string variable since that
is where data move from the java applet into the webpage through the
use of javascript.

That being said:

> Does anyone know of a similar thing in Excel? I anticipate having a
> button on the spreadsheet which is clicked. The code for the button
> would do something like the above...

I suspect having a button in Excel that does this when clicked would
be near impossible, Having a button on the webpage that pulls data
from Excel might be possible, but it will likely be fragile and
requires your students configuring their browsers to be dangerously
open to external attacks.

An example of how one might go about this is documented here:

As you can see from the example it would require the use of ActiveX to
start and manage the Excel, which means the students need to open the
ability for webpages to opena and run Excel which means now their
computer could easily get hijacked by a malicious webiste which could
all kinds of nasty things to them.

So is it possible... Yes ... but only likely for Windows computers set
to really promiscious modes. 

guy@albertelli.com   0-7-0-9-27,137