Following formula which use to work with the older version of aspose.cells (4.4.0.1). But doesn't seem to be working with the new dll.
=VALUE(TEXT((StartDate_Input-NOW())/24,"[h]"))
I downloaded the latest dll because the old one doesn't support array formulas, but the new one is still giving errors.The array formula i am using is:
I have tested your issue and the formulas you have mentioned are working fine in the Latest Version of Aspose.Cells. Please try the attached Latest Aspose.Cells fix. If you still face a problem, please share your template file and code, we will look into it. Following is my Sample Code.
I am attaching my excel sheet. I have all the formulas in the spreadsheet, so I am not assigning formulas to the cell through the code.
So the only thing I do is open the workbook and call the function calculateformula. It then gives me the error "Index was outside the bounds of the array. Error in calculating cell D6 in Worksheet Outputs "
D6 in outputs sheet contains the formula =VALUE(TEXT((StartDate_Input-NOW())/24,"[h]"))
and C11 in Outputs sheet contains the array Formula.
Yes, we found the issue as you have described. We can reproduce the issue calling Workbook.CalculateFormula() method i.e.., "Index was outside the bounds of the array. Error in calculating cell D6 in Worksheet Outputs ".
We have fixed the issue you have mentioned. Please try the attached latest version. Please let us know if you still face a problem. Now Aspose.Cells also support the TRIM function.
Please make sure that you are using the latest fix that we have provided you in this thread. I don't get the problem as the range cell Premium[0,0].IsErrorValue returns me false value which is correct.
I am using the latest dll, as I wasn't getting this error with the old dll. I am trying to get value of the named range month which is also giving me error. The fix you provided earlier is working except this.
Well, we could you not find the issue you have mentioned using your template file with the latest fix (4.5.1.16). We appreciate if you could create a sample console application with all the files, zip it and post it here to reproduce the issue, we will check it soon.
Well, I have used your provided template file and it is working fine with the Aspose.Cells fix (V4.5.1.17). The values I am getting are Premium[0,0].Value = 429.0 and r1[0, 0].IsErrorValue = false.
Please make sure that the dll is properly added in your application. Copy the dll to the bin folder of your application. Remove the previous Reference of the Aspose.Cells from the application and add the reference of the newly added Aspose.Cells dll in your bin folder.
Please do let us know if you still face any problem.
I figured out why it is not working on my side, I am calling workbook.CalculateFormula() before getting the values out of the ranges specified. If I don't call the calculateformula then it doesn't give me 0 value and error.
Yes, calling Workbook.CalculateFormula() is giving 0 value for "PL_Premium" range and IsErrorValue boolean attribute is true for "PL_Deductible" range i.e. r1[0,0].IsErrorValue, We will figure it out soon.