I created a very simple .html file to test Aspose.Cells.Workbook, within the file, I use javascript code as following:
var objAspose = new ActiveXObject("Aspose.Cells.Workbook");
var objType = new ActiveXObject("Aspose.Cells.FileFormatType");
objAspose.Open_2("c:\\excel2.xml", 7);
objAspose.Save_5("c:\\aspose.xls",3);
return;
It works correctly.
When I put the javascript code to our system which use script com object to invoke the script within the IIS services, it will report "Automation server can't create object" when hit line "new ActiveXObject("Aspose.Cells, Workbook")".
I install the server on my local machine too.
I tried other ActiveXObject, like "Excel.Application", it works both in local html file and server-side script.
Any ideas what cause this problem?
Thanks!
Hi,
Thanks for considering Aspose.
First you have to make sure that the Aspose.Cells.dll is properly registered using regasm.exe on the server machine. Normally it gets registered related com clients when you use Aspose.Cells msi installer. Then you may create an asp page (.asp) for your need, put the code into the server side tags and save it on the server. You may either create a folder and make it as a virtual folder or you may directly put it in the ...\inetpub\wwwroot folder and use the url to access the page like: http://localhost/test.asp etc.
For Further refer, please check our wiki doc:
Accessing Component From COMClients
Thank you.
was having similar problems with workbook class… turned out an older dll was somehow being installed - one which did not contain reference to the workbook class. to fix, just browsed and added manually the dll file from the .net 2.0 folder in aspose/bin. hope it works out.
I found the reason is I should check on “everyone” option when install aspose.cells, instead I checked “just for me” options which is default value.