PDA

View Full Version : How to run excel module from javascripts?



kkw
12-01-2008, 03:05 AM
Hi all,

I would like to run an excel module from Javascript, the following is the codes I'm using to open an excel file, the next thing i want to do is to execute a pre-defined excel module (sub), what should I do?

var exc = new ActiveXObject("Excel.Application");
exc.visible = true;
exc.workbooks.open("abc.xls");
exc.ActiveSheet.Range('A1').value = 123;
'execute/run an excel module here, e.g. SelectRow()


Many thanks!!

Bob Phillips
12-01-2008, 03:23 AM
This is not tested, but you could try



exc.Run "SelectRow"

kkw
12-01-2008, 03:30 AM
thanks! but it doesn't work, seems syntax error in javascripts....