Hi,
Hi,
Thanks for using Aspose.Cells for .NET.
First, you need to search your data. Please see the following article for your reference.
Once, you were able to find your cell, then you can find the cell’s row or column using Cell.Row and Cell.Column properties.
Also, you can access your specific Row and Column using Worksheet.Cells.Rows and Worksheet.Cells.Columns collection.
Let us know if you still have any questions relating to Aspose.Cells for .NET, we will help you asap.
Hi,
Thanks this works fine.
Hi,
Thanks for your question.
I think, there are many date values in that row and you want to find the cell in that row which has maximum date value.
You can achieve it by iterating the row cells and comparing the date values.
Below is a sample code how to iterate the rows and find the maximum date value.
C#
int maxColumn = row.LastCell.Column;
//Iterate all columns in your row
for (int col = 0; col < maxColumn; col++)
{
//Access the cell
Cell cell = cells[row.Index, col];
if (cell.Type == CellValueType.IsDateTime)
{
DateTime dt=(DateTime)cell.Value;
if (maxDate < dt)
maxDate = dt;
}
}