Where can I find definitions of the number formats such as N2, N30, N75 etc?
Background - When I declare user variables as a date or number and choose a specific format strings, eg M/D/YY then the user variable gets stored in the content.xml as a text-user-field-decl (with value = number of days since 1900) and for each placement of the variable in the doc it is tagged as a text-user-field-get along with its format, the format being N2, N30, N75 etc. Eg if I choose a date format of "M/D/YY" then the format in the text-user-field-get is tagged as N30. I'm unable to find anywhere that these N2 N75 etc formats are defined. I can determine them one by one by defining them and opening up the content xml, but that's a bit tedious. Is there a spec where these formats (and hopefully their equivalent Java format patterns ) are defined?
thanks,
-gr
[Solved] Where to find number and date format definitions?
[Solved] Where to find number and date format definitions?
Last edited by riddellg on Mon Jan 15, 2018 11:08 pm, edited 1 time in total.
Re: Where to find number and date format definitions?
[Tutorial] Introduction into object inspection with MRI
https://wiki.openoffice.org/wiki/Docume ... er_Formats
https://wiki.openoffice.org/wiki/Docume ... er_Formats
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Where to find number and date format definitions?
Thankyou!
In doing more research I also noticed there are additional constructs in the content xml in the "automatic-styles" section that define N3, N75 etc similar to the below. I had not noticed that before. Very interesting in the above link that "N75" might not mean the same thing in different documents!
In doing more research I also noticed there are additional constructs in the content xml in the "automatic-styles" section that define N3, N75 etc similar to the below. I had not noticed that before. Very interesting in the above link that "N75" might not mean the same thing in different documents!
Code: Select all
<number:date-style style:name="N76" number:automatic-order="true">
<number:month number:style="long" number:textual="true"/>
<number:text> </number:text>
<number:day/>
<number:text>, </number:text>
<number:year number:style="long"/>
</number:date-style>
OpenOffice 4.1 on Windows
Re: [Solved] Where to find number and date format definition
ODF is one document format for arbitrary (future, yet unknown) software programs. Every implementation of the ODF standard can declare its own set of number formats. Nevertheless, they should look the same with any application.Very interesting in the above link that "N75" might not mean the same thing in different documents!
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: [Solved] Where to find number and date format definition
There are infinitely many different number formats based on the syntax (and the needed locale information in addition).
The style actually used in a cell and probably in many cells, is therefore not given by the very complicated direct definition, and can, on the other hand, not be given in short by an identifier known to the softawre itself. Each document has its own space of named number formats (roughly), explicitly described in the styles.xml subdocument and only referenced in the content.xml.
The style actually used in a cell and probably in many cells, is therefore not given by the very complicated direct definition, and can, on the other hand, not be given in short by an identifier known to the softawre itself. Each document has its own space of named number formats (roughly), explicitly described in the styles.xml subdocument and only referenced in the content.xml.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: [Solved] Where to find number and date format definition
I did not yet clearly understand for what reason the OQ ("riddellg") was analysing the content.xml. It may be interst and curiosity, but a kind of research for actual application as well.
In the latter case the very concise code from Lising 5.38 in chapter 5.14 of the "Useful Macro Information" by Andrew Pitonyak may help a lot.
See http://www.pitonyak.org/AndrewMacro.odt, also available as pdf.
In the latter case the very concise code from Lising 5.38 in chapter 5.14 of the "Useful Macro Information" by Andrew Pitonyak may help a lot.
See http://www.pitonyak.org/AndrewMacro.odt, also available as pdf.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München