Returns a Cell object that represents the cell at the end of the region that contains the source range. Read-only.
expression Required. An expression that returns a Cell object.
Direction Required Long. The direction in which to move. Can be one of the following XlDirection constants: xlToLeft, xlToRight, xlUp, or xlDown.
Could you elaborate your need? Why you need this property? That will help us design this feature. Thanks.
I use my MS Excel designer workbook as a template so the users can modify a table on it. Users can add rows, columns to that table by using the traditional MS Excel. Data in that table will be used for other purposes. In short, number of rows and columns of that table are unknown. Therefore in the function ExportDataTable of Aspose.Excel, MaxRows and MaxColumns are unknown.
The End property would really help to determine those unknown parameters. Here is my workaround way in VB:
Public Enum xlDirection
Public Function CellEnd(ByRef Worksheet As Worksheet, ByRef Cell As Aspose.Excel.Cell, ByVal xlDirection As xlDirection) As Aspose.Excel.Cell
Dim rn As Integer = Cell.Row
Dim cn As Integer = Cell.Column
Select Case xlDirection
Do While Worksheet.Cells(rn, CByte(cn)).StringValue <> “” AndAlso rn < 65535
rn += 1
Do While Worksheet.Cells(rn, CByte(cn)).StringValue <> “” AndAlso rn > -1
rn -= 1
Do While Worksheet.Cells(rn, CByte(cn)).StringValue <> “” AndAlso cn > -1
cn -= 1
Do While Worksheet.Cells(rn, CByte(cn)).StringValue <> “” AndAlso cn < 256
cn += 1
Return .Cells(rn, CByte(cn))
I will add this feature in next week.