doesn’t it work anymore to use Aspose.Cells in classic ASP ?
Dim xls : Set xls = Server.CreateObject(“Aspose.Cells.Workbook”)
Dim sheet : Set sheet = xls.Worksheets.item(0)
Microsoft VBScript runtime error '800a01b6’
Object doesn’t support this property or method: ‘xls.Worksheets.Item’
If you want to use Aspose.Cells from unmanaged C++ (using COM), then we recommend you to make a wrapper assembly and then call your own assembly from C++/COM.
For example, you can create a function inside the wrapper assembly
//all of your code using Aspose.Cells goes here
Then from unmanaged C++/COM, you call this function instead of directly calling Aspose.Cells from C++/COM.
Creating a Wrapper Assembly
If you need to use many of the Aspose.Cells classes, methods and properties, consider creating a wrapper assembly (using C# or any other .NET programming language), that will help to avoid using Aspose.Cells directly from unmanaged code.
A good approach is to develop a .NET assembly that references Aspose.Cells and does all the work with it, and only exposes the minimal set of classes and methods to unmanaged code. Your application then should work just with your wrapper library.
Reducing the number of classes and methods that you need to invoke via COM Interop could simplify your project, because using .NET classes via COM Interop often requires advanced skills.
You can research on internet how you can create such a wrapper assembly which could be used in C++/COM.
Besides, we now recommend C++ users to use Aspose.Cells for Cloud (REST based APIs). Because these APIs can be used in any platform and languages.
Please also read the following product pages to get familiar with the Cloud APIs.
thank you for your detailed answer.
The short answer would be: No, you can’t.
I have no issues writing com-wrappers, your documentation just offer to use it in ASP classic, which is not possible (anymore), so imho you should update documentation.
I worked a long while trying with VBScript many different ways to open or to save an Excel file but without any luck. I then unregistered net4.0 and registered net2.0 and was able to save but not to open a file. Below is my script, (I also tried to modify the code all different ways that i saw in other comments) can you please advice what i’m missing here?
Set xls = CreateObject(“Aspose.Cells.GridDesktop”)
'I also tried xls.open “C:\Users\ChaimB\Desktop\helfhwl.xlsx”
I look forward to hearing from you soon
Do you want to use Aspose.Cells.GridDesktop control in Asp classic (VBScript) or you want to use Aspose.Cells library? Please note, both are different, Aspose.Cells is a .NET library and Aspose.Cells.GridDesktop is a separate desktop control. Aspose.Cells.GridDesktop cannot be used in Asp classic as it is a WinForm control.
Seeing your code segment (e.g xls.open_2), it looks like you are using Aspose.Cells library and find issue in this line of code. Please note in new versions, we replaced Workbook.Open method with its constructor, so if you are opening an Excel file via Aspose.Cells in C#.NET, you will write as following:
Workbook xls = new Workbook(“C:\\Users\\ChaimB\\Desktop\\helfhwl.xlsx”);
Hope, this helps a bit.
Thank you so much for your prompt response! Much appreciated!
I’m trying to use Aspose.Cells library not GridDesktop, I’m sorry for the confusion.
For Aspose.Words a wrapper is recommended as well but I still managed to get it work, therefore, I thought Aspose.Cells can work as well in VBScript via COM interop.
Thanks again for your response.
You are welcome.