Free Support Forum -

How are errors in a ICustomFunction implementation passed to the calculation engine?

I want to implement a bunch of custom functions. Here are my specific questions:

  • What is the standard way of signaling errors from the CalculateCustomFunction method? The documentation for CalculateCustomFunction: doesn’t mention anything. Here are some options:
  • Throw an exception
  • Return some special object that could interpreted as an error object by the ASPOSE library.

I want to report an error when the user tries to execute a function that is not supported, or when the actual list of parameters doesn’t match the function parameters in number or type etc. I want the message to make sense for the user so ideally my custom message would somehow surface to the user.

  • Are the CalculateCustomFunction calls made in the same execution thread as the call to the Workbook.CalculateFormula API or could they be executed in different threads?

Thank you


Thanks for your posting and using Aspose.Cells for .NET.

We have noted down your requirements and logged your issue in our database. We will look into your issue and help you asap.

Once there is some update for you, we will let you know.

This issue has been logged as CELLSNET-41410.


Thanks for using Aspose.Cells.

Please simply return a string value #NAME?”