com.poiji.bind.mapping.PoijiNumberFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of poiji2 Show documentation
Show all versions of poiji2 Show documentation
Perfect annotation based library to read and write excel files
package com.poiji.bind.mapping;
import java.util.SortedMap;
import java.util.TreeMap;
import org.apache.poi.xssf.model.StylesTable;
/**
* Created by hakan on 26.04.2020
*/
public final class PoijiNumberFormat {
private final SortedMap numberFormats = new TreeMap<>();
public PoijiNumberFormat() {
}
public void putNumberFormat(short index, String fmt) {
numberFormats.put(index, fmt);
}
public String getNumberFormatAt(short fmtId) {
return numberFormats.get(fmtId);
}
void overrideExcelNumberFormats(final StylesTable styles) {
for (Short fmtId : numberFormats.keySet()) {
String format = numberFormats.get(fmtId);
styles.putNumberFormat(fmtId, format);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy