[Libreoffice-bugs] [Bug 52602] New: Excel Visual Basic code compatibility issue in LibreOffice Calc: NumberFormat to date/time
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Jul 28 04:51:40 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=52602
Bug #: 52602
Summary: Excel Visual Basic code compatibility issue in
LibreOffice Calc: NumberFormat to date/time
Classification: Unclassified
Product: LibreOffice
Version: 3.5.5.3 release
Platform: All
OS/Version: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
AssignedTo: libreoffice-bugs at lists.freedesktop.org
ReportedBy: Tor24_1975314 at t-online.de
Created attachment 64804
--> https://bugs.freedesktop.org/attachment.cgi?id=64804
Excel test file with macro
Excel Visual Basic Date/time formatting does not work, Excel macro code
examples:
Example macro:
Sub Test_NumberFormat_DateTime()
' Preparing Test:
Range("A3").FormulaR1C1 = "40969.6388888889"
Range("B3").FormulaR1C1 = "40969.6388888889"
Range("C3").FormulaR1C1 = "40969.6388888889"
Range("D3").FormulaR1C1 = "40969.6388888889"
Range("E3").FormulaR1C1 = "40969.6388888889"
Range("F3").FormulaR1C1 = "40969.6388888889"
Range("A3").Select
' Testing Excel VBA Code in Libre Office:
Range("A3").NumberFormat = "hh:mm"
Range("B3").NumberFormat = "mm/dd/yyyy hh:mm"
Range("C3").NumberFormat = "mm/dd/yyyy hh:mm:ss"
Range("D3").NumberFormat = "d/m/yy h:mm"
Range("E3").NumberFormat = "d/ mmmm yyyy"
Range("F3").NumberFormat = "d/ mmm yyyy"
End Sub
The same problem with the NumberFormat function on Windows systems with other
regional settings.
Example Windows "Regional and Language Options": "German (Germany)"
with Formula/List Separator ';' and Decimal Symbol ','
Sub Test_NumberFormat_Number()
Range("A3").NumberFormat = "0,00000000"
Range("B3").NumberFormat = "0.00000000"
Range("C3").NumberFormat = "#,##0.00000"
End Sub
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list