Open an excel file in javascript

Hi, I am trying to open an excel file using Aspose.Cells object in javascript. I could initialize the object successfully, but it failed ( invalid procedure call/argument) on Open method. The following is the code i used:

var objAspose = new ActiveXObject("Aspose.Cells.Workbook");
objAspose.Open("c:\\excel2.xml", 8); //this line failed
objAspose.Save("c:\\aspose.xls",3);

Can i do this in javascript? if yes, what i should use for the second parameter for Open method (it is Enum type)?

thanks!

Please check Accessing Component From COMClients.

You can try:

objAspose.Open_6("c:\\excel2.xml", 7);

I am still getting the same error - invalid procedure call or argument.

I tried

objAspose.Open_6("c:\\excel2.xml", 7);
and

objAspose.Open("c:\\excel2.xml", 7);

they both gave the same error

advice?

thx.

Please try this attached version.

We have tested with VBscript but don't test it with javascript. Actually we don't recommend to call Aspose.Cells in html scripts. It's very frustrate to debug and trace the problem.

You can try to write a wrapper class to make the calls easy.

objAspose.Open_2(“c:\excel2.xml”, 7); works