// Formats
CTNumFmts formats = CTNumFmts.Factory.newInstance();
formats.setCount(numberFormats.size());
for (Entry<Long, String> fmt : numberFormats.entrySet()) {
CTNumFmt ctFmt = formats.addNewNumFmt();
ctFmt.setNumFmtId(fmt.getKey());
ctFmt.setFormatCode(fmt.getValue());
}
doc.getStyleSheet().setNumFmts(formats);
// Fonts
CTFonts ctFonts = CTFonts.Factory.newInstance();