Bug 200751 NPE in Excel emitter
writer.text( ( (Data) d ).txt.toString( ) ); SEVERE: An error happened while running the report. Cause: java.lang.NullPointerException at org.eclipse.birt.report.engine.emitter.excel.ExcelWriter.writeText(Ex celWriter.java:102) at org.eclipse.birt.report.engine.emitter.excel.ExcelWriter.writeTxtData (ExcelWriter.java:152) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.outputData( ExcelEmitter.java:311) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.end(ExcelEm itter.java:286) at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.re nder(RenderTask.java:593) at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask. java:260)
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelWriter.java
s = super.getEscapedStr(s, whitespace);
			
			StringBuffer result = null;
			
			char[] s2char = s.toCharArray( );
			for ( int i = 0, max = s2char.length, delta = 0; i < max; i++ )
			{
				char c = s2char[i];
				String replacement = null;
				
				if ( c == '\n' )
				{
					replacement = "&#10;"; 
				}
				
				if ( replacement != null )
				{
					if ( result == null )
					{
						result = new StringBuffer( s );
					}
					result.replace( i + delta, i + delta + 1, replacement );
					delta += ( replacement.length( ) - 1 );
				}
			}
			if ( result == null )
			{
				return s;
			}
			return result.toString( );