Bug 210720 [Automation][Acceptance]Date is displayed as datetime when export report to XLS
Description: Date is displayed as datetime when export report to XLS. Test Date: 20071123 Test Build: BIRT2.3.0 Daily Build: v20071123-0800 Step to reproduce: 1. Use the report attached 2. Export the report to XLS Expect Result: Date should be displayed as date type Actual Result: Date is displayed as datetime.
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelUtil.java
else if(val != null && data instanceof Number)
    	{
    	   
    	   if(val.indexOf( "E" ) >= 0){
    	      return "Scientific";
    	   }
    	   return new NumberFormatter(val).getPattern( );	
    	}
    	else if(val != null && data instanceof String)
    	{
    		return new StringFormatter(val).getPattern( );
    	}
    	
    	return null;
    }
    
    public static String replaceAll(String str, String old, String news) {
        if(str == null) {
           return str;
        }
        int begin = 0;
        int idx = 0;
        int len = old.length();
        StringBuffer buf = new StringBuffer();
        while((idx = str.indexOf(old, begin)) >= 0) {
           buf.append(str.substring(begin, idx));
           buf.append(news);
           begin = idx + len;
        }
        return new String(buf.append(str.substring(begin)));