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/layout/ExcelLayoutEngine.java
{
			IDataContent dataContent = (IDataContent) txt;
			Object value = dataContent.getValue( );
			if ( value instanceof Number )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.NUMBER_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.NUMBER_FORMAT_PROP, format );
				entry.setDatatype( Data.NUMBER );
				Data data = new Data( value, entry );
				data.setDatatype( Data.NUMBER );
				return data;
			}
			else if ( value instanceof Date )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.DATE_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.DATE_FORMAT_PROP, format );
				entry.setDatatype( Data.DATE );
				Data data = new Data( value, entry );
				data.setDatatype( Data.DATE );
				return data;
			}
			  
			Data data1 = new Data( dataContent.getText( ).trim( ), entry );
			data1.setDatatype( Data.STRING );
			return data1;
		}
		
		Data data1 = new Data( txt, entry );