I'm using POI to parse Excel file and reg. expression to detect currency in NumericCellValue
. I have 2 fields in Excel file with 2 difference currencies (100$ and 100€) and I need to get their currency code ("USD", "EUR").
case Cell.CELL_TYPE_NUMERIC: {
Pattern p = Pattern.compile(currencyFilter);
Matcher m = p.matcher(dataFormat);
if (m.find()) {
BigDecimal aCurrency = currentCell.getNumericCellValue();
//I need to pass my currency code from cell field to money instance
Money money = new Money(aCurrency, "USD");
}
}