Paul Veuve wrote:
Thanks for your help Juergen.
I try this.
unoidl.com.sun.star.sheet.XSheetCellCursor
xCursor = xSheet.createCursor();
unoidl.com.sun.star.sheet.XUsedAreaCursor
xUsedCursor =
(unoidl.com.sun.star.sheet.XUsedAreaCursor)xCursor;
xUsedCursor.gotoStartOfUsedArea(true);
xUsedCursor.gotoEndOfUsedArea(true);
But I don't find the way to extract the range of used cells.
Accessible methods for xUsedCursor are:
xUsedCursor.Equals()
xUsedCursor.GetHashCode()
xUsedCursor.GetType()
xUsedCursor.gotoStartOfUsedArea()
xUsedCursor.gotoEndOfUsedArea()
xUsedCursor.ToString()
I miss someting in the access principle.
Thank's for your help.
------------------------------
Paul Veuve
[EMAIL PROTECTED]
------------------------------
Paul,
You need the address. I use this function:
Function getLastUsedColRow(oSheet as Object) as Integer
Dim oCell As Object
Dim oCursor As Object
Dim aAddress As Variant
oCell = oSheet.GetCellbyPosition( 0, 0 )
oCursor = oSheet.createCursorByRange(oCell)
oCursor.GotoEndOfUsedArea(True)
aAddress = oCursor.RangeAddress
lastCol = aAddress.EndColumn
lastRow = aAddress.EndRow
End Function
I hope this helps.
Sincerely,
Gerrit Jasper
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]