Free Support Forum - aspose.com

Error multiplying time values

We have an excel document with a time value like


=“1:00” * 12

In Excel this equates to “0.5” (12 hours being a half day) but using the latest version of Aspose we get an error "#VALUE!"

An example is attached.

Hi,

Thanks for your posting and using Aspose.Cells.

Please download and use the latest version: Aspose.Cells
for .NET v8.5.1.3
it works fine.

I have tested this issue with the following sample code and it prints the correct value i.e 0.5

C#


string filePath = @“F:\Shak-Data-RW\Downloads\TimeMultiplied.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.CalculateFormula();


Worksheet worksheet = workbook.Worksheets[0];


Cell cell = worksheet.Cells[“B2”];


//It prints 0.5 which is correct, so no issue with the latest version

Console.WriteLine(cell.StringValue);


Thanks for the quick response. I thought we were running the latest version but we were not. I’ll update and give it a shot.

Hi,

Thanks for your posting and using Aspose.Cells.

Please feel free to test your application with the latest version and let us know if you encounter any issue relating to it. We will look into your issue and help you asap.