i didn’t found any examples how to create an .net object in coldfusion using aspose.cells.
i try to open and read some values from a xls file.
i wrote this code but i get an error.
the error appears on line where the Aspose.Cells.Workbook object is created.
Unable to find a constructor for class Aspose.Cells.Workbook that accepts parameters of type ( java.lang.String ).
Please check the article the article on how you can access .NET assemblies:
Also, check the document:
Although in the above topic, Aspose.Words for .NET component is used, but it will give you an idea how you can use Aspose.Cells for .NET in similar way as both products uses the same API model.
I access the .net assembly but still i got the error on doc.Init part:
Unable to find a constructor for class Aspose.Cells.Workbook that accepts
parameters of type ( java.lang.String ).
Right now I used this code write almost the same as it is for Aspose.Words:
<cfset doc=CreateObject(".NET", “Aspose.Cells.Workbook”, assemblyPath)>
Without the line with doc.Init(“C:\test.xls”) test2.xls file is saved correctly as an empty file.
Yes, you still may use Workbook.Open() method which is not eliminated but obsoleted which can work for your needs as you find issue while using Workbook constructor.