Return-Path: Delivered-To: apmail-jakarta-poi-dev-archive@www.apache.org Received: (qmail 56309 invoked from network); 3 Jan 2006 07:30:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jan 2006 07:30:20 -0000 Received: (qmail 75093 invoked by uid 500); 3 Jan 2006 07:30:19 -0000 Delivered-To: apmail-jakarta-poi-dev-archive@jakarta.apache.org Received: (qmail 75020 invoked by uid 500); 3 Jan 2006 07:30:18 -0000 Mailing-List: contact poi-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "POI Developers List" Reply-To: "POI Developers List" Delivered-To: mailing list poi-dev@jakarta.apache.org Received: (qmail 75008 invoked by uid 99); 3 Jan 2006 07:30:18 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jan 2006 23:30:18 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id A165CE0; Tue, 3 Jan 2006 08:29:57 +0100 (CET) From: bugzilla@apache.org To: poi-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 30319] - Euro symbol in usermodel DataFormat (+ FIX) In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20060103072957.A165CE0@ajax.apache.org> Date: Tue, 3 Jan 2006 08:29:57 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30319 jheight@apache.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From jheight@apache.org 2006-01-03 08:29 ------- I have implemnted a fix in SVN, however it is not as suggested in the Workbook, but rather in the low level FormatRecord. Confirmed that it works with the following code: Please check on a euro excel version, but ill close since i think that it is now fixed. import org.apache.poi.hssf.usermodel.*; import java.io.*; public class Test { public static void main(String[] args) { try { long time1 = System.currentTimeMillis(); // HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(new File( // "c:/workbook-orig.xls"))); // wb.write(new FileOutputStream(new File("c:/workbook-out.xls"))); // HSSFWorkbook wb = new HSSFWorkbook(); HSSFDataFormat df = wb.createDataFormat(); short fmt = df.getFormat("_([$\u20ac-2]\\\\\\ * #,##0.00_);_([$\u20ac-2]\\\\\\ * \\\\\\(#,##0.00\\\\\\);_([$\u20ac-2]\\\\\\ *\\\"\\-\\\\\"??_);_(@_)"); HSSFSheet s = wb.createSheet("TestSheet"); HSSFRow r = s.createRow(0); HSSFCell c = r.createCell((short)1); c.setCellValue(12.34); c.getCellStyle().setDataFormat(fmt); wb.write(new FileOutputStream(new File("c:/test1_out.xls"))); System.out.println("Elapsed :"+(System.currentTimeMillis()-time1)); } catch (Exception ex) { ex.printStackTrace(); } } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/