Hello, Currently I encounter a strange problem and I don't know how to solve it using POI. I'm not sure I can.
In my cell i've the value ['BLA]. The cell type is text. In POI, i can't catch the first apostrophe. It's not part of the value. Can we avoid this behaviour using POI ? Does any body as a solution to catch this first quote (apostrophe) in a text cell ? Just for your information. Here is what I get in a sample Read/system.out program : Debut du traitement d'imports de fichiers Excel LIGNE 1 : Cellule sans quote cell.getCellType() : 1 cell.getStringCellValue() : BLA cell.toString() : BLA cell.getCellComment() : null cell.getCellStyle() : org.apache.poi.hssf.usermodel.hssfcellst...@1b9142d0 cell.getRichStringCellValue() : BLA cell.getHyperlink() : null LIGNE 2 : Cellule avec quote STANDARD cell.getCellType() : 1 cell.getStringCellValue() : BLA cell.toString() : BLA cell.getCellComment() : null cell.getCellStyle() : org.apache.poi.hssf.usermodel.hssfcellst...@5a9aa9f7 cell.getRichStringCellValue() : BLA cell.getHyperlink() : null LIGNE 3 : Cellule avec quote TEXTE cell.getCellType() : 1 cell.getStringCellValue() : BLA cell.toString() : BLA cell.getCellComment() : null cell.getCellStyle() : org.apache.poi.hssf.usermodel.hssfcellst...@8f166529 cell.getRichStringCellValue() : BLA cell.getHyperlink() : null LIGNE 4 : Cellule avec quote PERSO cell.getCellType() : 1 cell.getStringCellValue() : BLA cell.toString() : BLA cell.getCellComment() : null cell.getCellStyle() : org.apache.poi.hssf.usermodel.hssfcellst...@8f166529 cell.getRichStringCellValue() : BLA cell.getHyperlink() : null LIGNE 5 : Cellule avec quote STANDARD et numérique cell.getCellType() : 1 cell.getStringCellValue() : 99 cell.toString() : 99 cell.getCellComment() : null cell.getCellStyle() : org.apache.poi.hssf.usermodel.hssfcellst...@5a9aa9f7 cell.getRichStringCellValue() : 99 cell.getHyperlink() : null I've tried several POI classes to read my Excel workbook (version 3.6): - HSSFCell - ExcelExtractor - Row and HSSFListener Just FYI, I've also tried JExcel 2.6. Thanks for your help, Regards, Timothée CHEVRIER --------------------------------------------------------------------------- LOGICA T. : +33 (0)2 14 37 80 78 VOIP : 14078 [email protected] www.logica.com/france Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
