int i, j;
fpSpread1.Columns[2].CellType = new FarPoint.Win.Spread.CellType.DateTimeCellType();
for( i = 0; i < 10; i++ )
fpSpread1.ActiveSheet.SetValue(i, 0, i + 1);
j = 0;
for( i = 106; i > 96; i-- )
{
fpSpread1.ActiveSheet.SetValue(j, 1, Convert.ToChar(i));
j += 1;
}
System.DateTime mydate = System.DateTime.Now;
for( i = 0; i < 10; i++ )
fpSpread1.ActiveSheet.SetValue(i, 2, mydate.AddDays(i));
label1.Text = "The last non-empty column and row is: Column( " + fpSpread1.ActiveSheet.GetLastNonEmptyColumn(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString()
+ ") - Row(" + fpSpread1.ActiveSheet.GetLastNonEmptyRow(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString() + ")";