Bug 200631 [smoke]Fail to preview report in xls[1203]
Description: Fail to preview report in xls Build number:2.2.1.v20070821 Steps to reproduce: 1. New a report. 2. Insert a label. 3. Preview in xls. Expected result: Display content. Actual result: See attached. Fail to open report. Error log:n/a
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelUtil.java
public static String ridQuote( String val )
	{
		if ( val.charAt( 0 ) == '"' && val.charAt( val.length( ) - 1 ) == '"' )
		{
			return val.substring( 1, val.length( ) - 1 );
		}
		return val;
	}
    
	public static String getPattern(Object data, String val)
    {
    	if(val != null && data instanceof java.util.Date) {
    	   if (val.indexOf( "kk:mm" ) >= 0){
    		   return "Short Time";	   
    	   }
    	   else if(val.startsWith( "ahh" ))
    	   {
    		   return "Long Time";   
    	   }
    	   else if(!val.startsWith( "ahh" ) && val.indexOf( "ahh" ) >= 0)
    	   {
    	      return "General Date";	   
    	   }
    	   return new DateFormatter(val).getPattern( );
    	}
    	else if(val == null && data instanceof java.util.Date) {
    	   return "yyyy/mm/dd";	
    	}
    	else if(val != null && data instanceof java.lang.Number)
    	{