Marc Santhoff wrote:
Hi,
when asking a calc cell for it's number format
cType = aCell.NumberFormat
it does return this values:
E F G H
1,23 € 01.01.75 12.10.05 12.06.39 00:00
NumberFormat
dez 106 37 50 30
bin 1101010 100101 110010 11110
As you can see, the first column is a currency value and has it's second
bit set. This qualifies it as a time value according to
"css.util.NumberFormat". This is nonsense, isn't it?
How are type codes composed? I don't get the rules for testing an arbitrary
cell if it is diplayed as date or time value in any way (built in format
or user defined template).
TIA,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Marc,
That's funny and I don't get it.
When I run the sub given below it gives the number format of
the selected cell, and only one value (as long).
And what's more: XRay.XRay oCell and oCell.NumberFormat
agree on the value, each time.
Sub cellFormat
oDocument = ThisComponent
oSheet = Thiscomponent.CurrentController.ActiveSheet
oSelect = Thiscomponent.CurrentSelection.getRangeAddress
nCellCol = oSelect.StartColumn
nCellRow = oSelect.StartRow
oCell = oSheet.GetCellByPosition( nCellCol, nCellRow )
XRay.XRay oCell
MsgBox "format " & oCell.NumberFormat
End Sub
Sincerely,
Gerrit Jasper
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]