Bug 198070 ArrayIndexOutOfBoundsException throws out for grid with ZERO columns
The exception stack is: java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.birt.report.engine.emitter.excel.layout.LayoutUtil.createTable(LayoutUtil.java:96) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.startTable(ExcelEmitter.java:128) at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutNoNestEmitter.startTable(HTMLTableLayoutNoNestEmitter.java:72) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil$StartContentVisitor.visitTable(ContentEmitterUtil.java:82) at org.eclipse.birt.report.engine.content.impl.TableContent.accept(TableContent.java:87) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil$StartContentVisitor.visit(ContentEmitterUtil.java:55) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:42) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.startContent(HTMLAbstractLM.java:113) at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:84) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:171) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layoutChildren(HTMLPageLM.java:142) For an empty GRID, the BIRT will create a table content with ZERO columns, XLS should handle it gracefully.
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/layout/LayoutUtil.java
{				
				try {
					index[i] = ExcelUtil.covertDimensionType( value, width ); 
					know += index[i];
				}
				catch(IllegalArgumentException ex)
				{
					unmount.add( new Integer(i) );
				}
			}	
		}		
		
		int left = width - know;
		
		if(left > 0 && unmount.size( ) == 0)
		{
			index[index.length - 1] = index[index.length - 1] + left; 
			return new DefaultTableInfo(index);
		}
		else if(left < 0 )
		{
			return new DefaultTableInfo(split(width, colcount));
		}
		else if(left > 0 && unmount.size( ) > 0)
		{
			int[] size = split(left, unmount.size());			
			Iterator iter = unmount.iterator( );
			int i = 0;
			
			while(iter.hasNext( ))