We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Min/max int- DateTime value from a range of cells

hi,


I want to find out the minimum value of type int / Date from a range of cells. Is there a short way to do it like IntRange.Min; DAteRange.Min?

Thanks

Hi,


Well, this is simple, you may use “Min/ Max” Ms Excel function(s) for your task, you evaluate the formula based on your desired range to get your results accordingly at runtime. Please see the sample code below:
e.g
Sample code:

Workbook workbook = new Workbook(“e:\test2\Bk_minvalue1.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
//Write the formula based on your desired range.
var formula1 = @"=MIN(A1:A30)";
var result1 = worksheet.CalculateFormula(formula1);


MessageBox.Show(result1.ToString());


Hope, this helps you a bit.

Thank you.