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

James Sullivan lon-capa-users@mail.lon-capa.org
Mon, 21 May 2007 14:48:03 -0400


What if you were to use a javascript spreadsheet instead of excel? 

Is the "Excel" part of the problem critical, or do you just need the student to work with some type of spreadsheet program? If you could use a javascript spreadsheet instead, I'm guessing you could get the spreadsheet to talk back to the parent problem page without any major portability or security issues.

Just a thought, Good luck. I'd be interested to hear how this turns out.
Jay


>>> Guy Albertelli II <guy@albertelli.com> 05/21/07 12:55 PM >>>
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:
http://forums.devarticles.com/javascript-development-22/pulling-and-displaying-data-from-excel-spreadsheet-47084.html

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
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users