we are recently upgraded Spire.xls from 7.12 to 11.2.3.0 and processing a excel template which has lot of formulas in it. After upgrading the spire excel, we are receiving the following error in workbook.CalculateAllValue()
- Code: Select all
2021-02-19 13:20:25.7987|ERROR|Swepco.Home|Object reference not set to an instance of an object.
2021-02-19 13:20:25.9060|ERROR|Swepco.Home| at spr?.?(Boolean A_0, spr? A_1)
at spr?.?()
at Swepco.Home.downProposal_Click(Object sender, EventArgs e) in D:\Projects\SWEPCO\Source\Swepco\Swepco\Home.aspx.cs:line 99
sample code below
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@Standardpath);
MemoryStream ms = new MemoryStream();
try
{
workbook.CalculateAllValue(); //error here
}catch(Exception ex)
{
logger.Error(ex.Message);
logger.Error(ex.StackTrace);
}
workbook.SaveToStream(ms);
byte[] bytesInStream = ms.ToArray();
ms.Close();
Also attached the sample excel which has all the formulas but failed to "CalculateAllValue()"
Please advise..
Thanks in advance
Eswaran