You can get the type of a cell. Here is what I do. Look at the HSSFCell class. I would think a column could have many types as each cell can have a different type.
HSSFCell cell = ci.next(); if (cell.getCellType() == cell.CELL_TYPE_STRING) s = s+cell.getRichStringCellValue(); -----Original Message----- From: noobguru [mailto:[email protected]] Sent: Friday, December 19, 2008 5:11 PM To: [email protected] Subject: reading excel - can I get column format? I've tried looking in the apache poi documentation as well as this forum, however, I couldn't find if it was possible to get the format of a column in a 2007 excel file. Is this possible at all? (e.g. whether a column is a Number, String, Date, etc). If this is not possible, is there a way to get the format of a cell that has no data in it? (e.g. whether this cell is formatted as a Number, String, Date, etc). Thanks in advance! ~noobguru -- View this message in context: http://www.nabble.com/reading-excel---can-I-get-column-format--tp2109903 1p21099031.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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
