If you are using version 3.7-beta1 or higher, try the CellFormat class instead of DataFormatter. E.g. in your example code use
CellFormat cellFormat = CellFormat.getInstance(cell.getCellStyle().getDataFormatString()); and data[i][j] = cellFormat.apply(cell).text CellFormat appears to work for your "000-00000-000" custom format but I've found that CellFormat has some issues (I'm working on a patch) so it may not work correctly for other custom cell formats in your Excel files. Regards Steve -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Reading-cell-values-that-have-a-custom-format-tp5486315p5495664.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
