Hi guys,

I am facing the following issue: I'm parsing through an excel, the excel
contains percentage fields such as 19%, 25%, 33,33% etc. as well as core
numeric fields (0.1234, 2.4567 ...).

We use the parse in order to generate an excel preview, therfore we have to
detect "somehow" whether a percentage cell or a default numeric cell has
been parsed, as POI (correctly) transforms percentage values to numeric ones
(19% -> 0,19 -> no clue whether this is a percentage field or numeric...)

Can anybody tell me how to recognize percentage values during parsing the
excel? I need sth like this...:

if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC)
{
   // percentage cell 
   if (cell.IS_PERCENTAGE_CELLTYPE....) 
   {
    ....
   }
   
   // default numeric cell...
   else
   {
   ...
   }
}

thanx in advance, Florian!

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Detect-percentage-value-during-parsing-tp4312746p4312746.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]

Reply via email to