Numbering in the format of [000X] with leading zeros
See original GitHub issueI am trying to build a numbering format that uses up to three leading zeros, which is possible in the Word GUI.
I have gotten close with this format:
{
reference: 'numbering',
levels: [
{
level: 0,
format: 'decimalZero',
text: '[00%1]',
alignment: AlignmentType.LEFT,
suffix: LevelSuffix.NOTHING
}
]
}
But it fails at 100+ going to [00100]
rather than [0100]
I found in the spec that it says there is a format
attribute that:
Specifies a custom format using the XSLT format attribute. For example, a value of ア indicates that Katakana numbering should be used.
Does docx allow for custom formats? Is there another method that I’m missing?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Using a custom number format to display leading zeros
When you want to display leading zeros for a fixed-length number, create a custom format with the same number of zeros (0) as...
Read more >2 Ways to Format a Number with Leading Zeros in Oracle
When using the TO_CHAR(number) function, use the 0 format element to include leading and/or trailing zeros. Example: SELECT TO_CHAR(7, 'fm000') ...
Read more >Left zero padded format numbers - java - Stack Overflow
Show activity on this post. I want to format 4-digit numbers with left padded zeros and 5-digit numbers with no leading zeros so...
Read more >Excel Format Numbers: How to turn "1" into "001" or "EN001"
In many instances, we would have to work with ID numbers that by nature need to have a few leading zeros before the...
Read more >How to Format Numbers with Leading Zeros in Excel [Tutorial]
How to Format Numbers with Leading Zeros in Excel. Leading zeros are those pesky place-holding 0 digits at the beginning of a number....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exactly. Thanks so much for your help though! I appreciate you reaching out 😄
Yeah, I think you’re right. That makes a lot of sense. Basically you’re passing ‘000%1’ in and then the %1 is being replaced with the current number.