Support Excel UDF's in Aspose.Cells

dear support,


I am using ExcelDNA to develop some Excel User Defined Functions ( UDF ) and am now trying to integrate this in an Aspose.cells application and have some questions.

> how does Aspose.cells evaluate user defined functions ? If CalculateFormula() is called, what happens if a UDF is received

> how does Aspose.cells recognize a UDF ?

> Is there a way to execute these UDF’s within Aspose.Cells. As an example, if an UDF uis recognized by Aspose.cells when CalculateFormula is called, is there no way to call an external process that calculates the UDF.

thnak you for your thoughts,

guido

Hi Guido,

Thanks for using Aspose.Cells.

By user defined function, you mean the custom function. Aspose.Cells has provided the ICustomFunction interface which can be used to define and calculate user defined function.

Please see this article that explains the ICustomFunction feature and how to implement it inside your code.

( Using ICustomFunction Feature|Documentation )

ok thank you for the info.


But that does not really answer my questions above.

How does Aspose,cells recognize a UDF ? if CalculateFormula() is called, what happens if a UDF is recognized ?

thnsak you

guido






Hi guido,

Thanks for your posting and using Aspose.Cells.

Please provide us some Excel file with some sample UDF function so that we load it using Aspose.Cells and check the behavior of Aspose.Cells how it treats your UDF function. We will investigate it and update you asap.

Thanks for your cooperation.

I have attached an example VB .NET code to create an Excel UDF. It is based on the ExcelDNA framework. There are three resulting files ( a dll, a dna and a xll file ). These files are to be stored somewhere on a directory.


The xll is to be referenced in Excel as an Add-In. From that point onwards, 4 new UDF’s are available in Excel using this Add-In.

The problem I have now is that this newly built Excel function cannot be referenced within Aspose.cells. Ideally, I would like to have the new functions also execute when the workbook.calculateformula() is called

Thnak you for your thoughts,



Hi,

Thanks for your posting and using Aspose.Cells.

I have tried to run your program but it seems it is class library instead of console application and also it is missing a reference as shown in the attached screenshot.

However, user defined functions are executed by Aspose.Cells using the ICustomFunction interface and you have successfully experimented with it as I have seen your following post where you have provided a sample project running the ICustomFunction interface.

( ICustomfunction : returning a range and not a single cell )

yes, I am now using a workaround as Aspose.cells does not support user developed UDF’s.

In any case, thanks for your help.
guido

Hi Guido,

Thanks for your confirmation and using Aspose.Cells.

Please follow your other thread, we will log your requirement once you will provide us the expected pdf. Let us know if you encounter any other issue, we will be glad to look into it and help you further.