Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Excel macro and javascript

 
amey mahadik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am able to open an excel sheet using javascript and now i want a macro to run as soon as the excel sheet is opened.
I have used Auto_Open() and it runs fine when i open the excel sheet manually but when i open the sheet using javascript the macro does not run at all.

Here is the javascript code i have written to open the excel file.

function openExcel(){

var Excel; // Declare the variables
Excel = new ActiveXObject("Excel.Application");
Excel.Workbooks.Open("C:/Final templates/MyExcel.xls");
Excel.Visible = true;
}

Is there a way to run this macro..?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic