Cell formulas not calculated when saving file as PDF

Hi


I have an excel sheet which uses a custom VBA formula to determine values in a table

When I save the file as an xlsm its formulas work fine and the table is rendered as I would expect, however when I save the file as a pdf, Each of cells in the table has the value #NAME?

Basically it looks like the PDF version did not pick up the custom formula and hence we get the error.

FYI - we set enableMacros to true and ran calculateFormula prior to saving as PDF

regards

Dave

Hi,

Thanks for your posting and using Aspose.Cells.

EnableMacros property does not execute your Macros, it is used when you copy your worksheet into another worksheet in a same workbook so that your Macros are not lost while copying.

In fact, you cannot use any custom function which uses Macros. Aspose.Cells cannot handle them. However, Aspose.Cells provides an interface which you can implement and write your own logic to deal with such custom functions.

Please have a look at this article that will help you implement your own custom function logic.

( Implement Custom Calculation Engine to extend the Default Calculation Engine of Aspose.Cells|Documentation )