//Ugly, but we can't switch on objects and
//operator overloading breaks down as we have a handle to a generic 'object'
if(value!=null &&value instanceof String){
log.finest("UpdatingCell:"+fact.getCellName()+" value:"+value+" as String");
HSSFRichTextString textValue=new HSSFRichTextString(value.toString());
poiCell.setCellValue(textValue);
poiCell.setCellType(HSSFCell.CELL_TYPE_STRING);
} else if(value!=null &&value instanceof Boolean){
log.finest("UpdatingCell:"+fact.getCellName()+" value:"+value+" as Boolean");
poiCell.setCellValue((Boolean)fact.getValue());
poiCell.setCellType(HSSFCell.CELL_TYPE_BOOLEAN);
} else if(value!=null &&value instanceof Number){
log.finest("UpdatingCell:"+fact.getCellName()+" value:"+value+" as Number");
Double number = ((Number)value).doubleValue();
poiCell.setCellValue(number);
poiCell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
} else if(value!=null &&value instanceof Date){
//Excel dates are numbers with a special style
log.finest("UpdatingCell:"+fact.getCellName()+" value:"+value+" as Date");
Double number = ((Number)value).doubleValue();
poiCell.setCellValue(number);
poiCell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
poiCell.getCellStyle().setDataFormat(HSSFDataFormat.getBuiltinFormat(EXCEL_DATE_STYLE));
} else if(value!=null){
//Treat as object, use toString() method
log.finest("UpdatingCell:"+fact.getCellName()+" value:"+value+" as Generic Object");
HSSFRichTextString textValue=new HSSFRichTextString(value.toString());
poiCell.setCellValue(textValue);
poiCell.setCellType(HSSFCell.CELL_TYPE_STRING);
} else {