Using Aspose.Cells via COM interop | Open file

Hello,

I’m new to using Aspose within Delphi 10.3. I’v registerd Aspose.Cells.dll and imported the TLB in Delphi.

Now i want to open an existing file. I can’t find any method to open a file. Setting the filename property does not open the file.
How do i open a file?
Is there a demo project or help for use Aspose Cells in Delphi by com-interop available?

Regards,
Marchel

@Marchel,

There is no explicit method to open the file via Aspose.Cells APIs, one can use its constructor to load/open the file into Aspose.Cells object model. See the sample .NET code for your reference:

//Open the file.
Workbook workbook = new Workbook (“e:/test2/myfile.xlsx”);

Also, see the docs for your reference.

Please note, Aspose.Cells is written in manged .NET/Java and can be used via COM Interoperability. But I think, to use it via com interop. is a bit challenging and you would always need advanced technical skills for the task. There might be some issues to cope with which might not be fixed all the time considering the different diverse architectures and environments. So, we recommend our users to create a wrapper assembly which should wrap Aspose.Cells and expose itself as a COM object (you may write your desired tasks using custom functions via Aspose.Cells APIs in the wrapper assembly). Please research on internet on how to create a .NET assembly which could expose itself as COM object. In short, you can bundle your desired features/tasks of Aspose.Cells in the wrapper assembly/component and on your delphi platform, you will just register the assembly and call your custom methods for your desired tasks and feature. We also recommend some users to use Aspose.Cells for Cloud (REST based APIs). Because these APIs can be used in any platform and languages for their needs.