Calculating in memory excel file that is referencing xla

I have a template excel file (given by business team). This excel file is using xla file for custom (very complex) calculations. My job is to feed that excel file in aspose cells object and feed a particular Worksheet (Say A). The values are thus supposed to be calculated and available at another worksheet (Say B). However, I am not getting values at B. Its giving like #NAME? stuffs. What am I doing wrong?

Here is part of the code:

wb.CalcMode = CalcModeType.Automatic;

wb.CalculateFormula(true);
Worksheet ws = wb.Worksheets[“Results”];


Hi,

Could you post your template file here, we will check your issue soon.

Thank you.

I have attached the template file. Here all I have to do is fill out Assumptions tab and read value from results tab. All the calculations happens from benefit calculator tab which i don’t touch.

Thanks for looking into this.

Hi,

Thanks for providing us the file.

We will check your issue soon.

Thank you.

Hi,

After checking your template file, we found external references in your formulas. Well, I am afraid, we do not support to calculate formulas with external links/references.

Sorry for any inconvenience.

Thats what I thought. I know you guys only preserve macros but not run it.

Well, thanks for that. Now I am trying to call that external object within my .net code and get that formula calculated from the .net side itself rather than excel doing it.

Hope I succeed doing that.

Thanks for looking into this issue.