Dear users, My general problem: 1. I would like to format numbers with currencies: Dollar, Euro, Yen, every possible currency... 2. Maybe it´s not possible to use symbols, which are not Dollar and Euro. My alternative choice would be a simple formated number with an additional ISO-Code for the country, such as: 2,999.00 USD
Maybe some had the same problem: Im trying to format the cells with formats like: lokal_format = "#.##0,00 \"ISK\""; HSSFCellStyle style_White_XS_own style_White_bold_own = wb.createCellStyle(); style_White_bold_own.setFillForegroundColor(new HSSFColor.WHITE().getIndex()); style_White_bold_own.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); style_White_bold_own.setFont(font_bold); //-- The interesting part is here: //-- 1. version, doesn´t work: style_White_XS_own.setDataFormat((short)formato.getFormat(format)); //-- 2. version, doesn´t work: //I have tried to change the class: org.apache.poi.hssf.usermodel.HSSFDataFormat //Method: private static synchronized List createBuiltinFormats() builtinFormats.add(50, "m/d/yy h:mm"); builtinFormats.add(51, "m/d/yy h:mm"); ... builtinFormats.add(180, "m/d/yy h:mm"); //I have tried to use my own created builtinFormats with this statement: style_White_XS_own.setDataFormat((short)180); // However, it doesn´t work It would be nice, if someone could share the experiences with currencies and POI. Thanks in advance. Best regards Slavko --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
