All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.msoffice.xlsx.gen.NumFmt Maven / Gradle / Ivy

There is a newer version: 0.5.9
Show newest version
package kz.greetgo.msoffice.xlsx.gen;

import java.io.PrintStream;

public enum NumFmt {

  PERCENT("10", null), // процент с двумя знаками после запятой
  FRACTION("12", null), // простые дроби
  DMY("165", "dd\\/mm\\/yyyy"), //
  HMS("166", "hh:mm:ss"), //
  DMY_HMS("167", "dd\\/mm\\/yyyy\\ hh:mm:ss"), //
  YMD("168", "yyyy\\-mm\\-dd"), //
  YMD_HMS("169", "yyyy\\-mm\\-dd\\ hh:mm:ss"), //
  NUM_SIMPLE0("170", "0_ ;\\-0\\ "), //
  NUM_SPACE0("171", "#,##0_ ;\\-#,##0\\ "), //
  NUM_SIMPLE2("172", "0.00_ ;\\-0.00\\ "), //
  NUM_SPACE2("173", "#,##0.00_ ;\\-#,##0.00\\ ");

  private final String id;
  private final String formatCode;

  public String getId() {
    return id;
  }

  NumFmt(String id, String formatCode) {
    this.id = id;
    this.formatCode = formatCode;
  }

  private static int extfmtn = 0;
  private static String extfmts = "";

  static {
    for (NumFmt fmt : values()) {
      if (fmt.formatCode != null) {
        extfmtn++;
        extfmts += "";
      }
    }
  }

  public static void printAll(PrintStream out) {

    out.println("");
    out.println(extfmts);
    out.println("");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy