public Const MYDATEFORMAT = "JJJJ-MM-TT"
[...]
Dim aLocale As New com.sun.star.lang.Locale
oFormats = _
oDokument.NumberFormats
nDateTime_Format_DATE = _
oFormats.queryKey( MYDATEFORMAT, aLocale, True )
' Schluesselwert nicht gefunden: hinzufuegen Format
' format not found - key not returned: add format
If nDateTime_Format_DATE < 0 Then
nDateTime_Format_DATE = _
oFormats.addNew( MYDATEFORMAT, aLocale )
End If
Hallo,
wenn ich die richtigen Einstellungen für das Nummernformat ermitteln will, formatiere ich eine Beispielzelle wie gewünscht und frage dann die Eigenschaften mit XRAY ab. Xray kannst Du Dir als OO- Erweiterung herunterladen.
Moritz
sub Eigenschaften
BasicLibraries.LoadLibrary("XrayTool")
If thisComponent.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then
xray thisComponent.getCurrentSelection()
end if
end sub