public class NumFmt extends Object implements Comparable<NumFmt>
A number format can have up to four sections of code, separated by semicolons. These code sections define the format for positive numbers, negative numbers, zero values, and text, in that order.
<POSITIVE>;<NEGATIVE>;<ZERO>;<TEXT>
For example, you can use these code sections to create the following custom format:
[Blue]#,##0.00_);[Red](#,##0.00);0.00;"sales "@
You do not have to include all code sections in your custom number format. If you specify only two code sections for your custom number format, the first section is used for positive numbers and zeros, and the second section is used for negative numbers. If you specify only one code section, it is used for all numbers. If you want to skip a code section and include a code section that follows it, you must include the ending semicolon for the section that you skip.
https://support.office.com/en-us/article/create-or-delete-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4 https://support.office.com/en-us/article/Number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2010/ee857658(v=office.14)
public NumFmt(String code)
public String getCode()
public void setCode(String code)
public int getId()
public static NumFmt valueOf(int id)
id - the built-in idNumFmtpublic org.dom4j.Element toDom4j(org.dom4j.Element root)
public int compareTo(NumFmt o)
compareTo 在接口中 Comparable<NumFmt>Copyright © 2020. All rights reserved.