poi-2.0-final-20051122.jar couldn't write Excel output properly when a formula contains a Euro symbol, e.g, =TEXT('Value is '!H7,"€###,##0") The output for "€###,##0" will become some garbage, but same length. If I take out the Euro symbol then everything works fine. I'm following the Busy Developers' Guide to HSSF: // Write the output to a file FileOutputStream fileOut = new FileOutputStream("workbook.xls"); wb.write(fileOut); fileOut.close(); Note: I have no choice but to use poi 2.0 because all subsequent versions will cause errors on my workbook (quite complicated), "Unable to read file." and eventually "Damage to the file was so extensive that repairs were not possible. Excel attemted to recover your formulas and values, but some data may have been lost or corrupted." -- perhaps I should file another bug report for this later. If there's no plan to back patch to version 2.0, if anyone know please tell me where to fix it so that I can do it myself. Thank you very much.
Btw, I have also tried: wb.setSheetName(0, wb.getSheetName(0), HSSFWorkbook.ENCODING_UTF_16) and wb.setSheetName(0, wb.getSheetName(0),HSSFWorkbook.ENCODING_COMPRESSED_UNICODE) and even (((wb.getSheetAt(0)).getRow(2)).getCell((short)4)).setEncoding(HSSFWorkbook.ENCODING_UTF_16) and (((wb.getSheetAt(0)).getRow(2)).getCell((short)4)).setEncoding(HSSFWorkbook.ENCODING_COMPRESSED_UNICODE) before writing the output, but didn't work. Even if setting individual cell works, I do not know when the users will type the Euro symbol, it could exists anywhere in the workbook.
Fix applied to SVN. Tested in TestUnicodeWorksheet. Jason