Free Support Forum -

CalculateFormula throw NullReferenceException when using references to other sheets

I'm currently evaluating the Aspose.Excel ( product.
I'm running a simple Excel 2003 workbook in which i've got a cell formula ("=Sheet2!C8") using a reference to an other sheet in the same workbook.

I'm running this simple C# code:

string strWorkBookFile = "";
Aspose.Excel.Excel oExcel = null;
Aspose.Excel.Cell oCell1 = null;
Aspose.Excel.Cell oCell2 = null;

strWorkBookFile = "POCAsposeExcel.xls";

oExcel = new Excel();

oCell1 = oExcel.Worksheets["Sheet1"].Cells["A1"];


txtBxOut.Text = oExcel.Worksheets["Sheet1"].Cells["A2"].StringValue;

But currently, "oExcel.CalculateFormula()" throw the a NullReferenceException ("Object reference not set to an instance of an object").

Is it related to the fact that i'm running the evaluation release
Is it because referencing other sheets in a formula is not supported?



I fixed this bug in v2.6.1.2. Please download it at

Hi Larence,

I tested the new version of aspose.excel v3.0.30. This problem came back. Please check it out.



Hi Benny,

I didn’t find the problem in my machine. Could you please upload your template file and sample code here? Thank you very much.