We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bypass GoalSeek and VBA/macro

dear support,


I need to migrate an Excel with lots of macro/VBA code. The macro/VBA code calls the Excel GoalSeek function.

I undertsand Aspsoe.Cells does not allow you to call the macro. But I can program the macro in .NET, that is simple.

The porblem is the GoalSeek function which is called several times. Is there a way to call it anyway - for example, does CalculateFormulas not execute the GoalSeek. In short, I am trying to find a way to workaround the GoalSeek function…

Thank you for your ideas

guido

Hi Guido,

Thanks for your posting and using Aspose.Cells.

If GoalSeek is a normal Excel function and not a Macro or VBA function, then CalculateFormual() will calculate it. However, if it is Macro or VBA function, then you will have to implement ICustomFunction interface yourself which will contain the logic of your Macro/VBA function.

Please see this article that explains how to implement ICustomFunction interface to calculate custom functions with the CalculateFormula() method.

( http://www.aspose.com/docs/display/cellsnet/Using+ICustomFunction+feature )