Home
Analytics
xls export failing for large data Birt 2.6.2
hiren01it
<p>We are using Birt 2.6.2 to generate the excel reports.</p><p> </p><p>We have two report design files(for two report types). </p><p> </p><p> </p><p>For one report design file, excel generation working fine for large data. It automatically adds new sheet in the excel. Its working properly.</p><p>For this we are using static design file.</p><p> </p><p>For another report design file, excel generation fails with following exception for large data(more than 67000 rows). This design file is generated dynamic.</p><p>If the no. of rows are less than 65,000 then its working properly.</p><pre class="_prettyXprint _lang-">Caused by: java.lang.NegativeArraySizeException at org.eclipse.birt.report.engine.emitter.excel.layout.Page.synchronize(Page.java:744) at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.endRow(ExcelLayoutEngine.java:492) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.endRow(ExcelEmitter.java:125)</pre><p>What could be the reason for above exception?</p><p>Is there anything wrong in design file or something wrong in my code?</p><p> </p><p> </p><p> </p>
Find more posts tagged with
Comments
micajblock
<p>No there is nothing wrong with your code. It is a limitation of Excel.</p><p> </p><p><a data-ipb='nomediaparse' href='
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx'>http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx</a></p>
;
hiren01it
<p>I have two different report types(both have different design file).</p><p> </p><p>In one report type, excel creates new sheet and adds the data there but in another report type new sheet is not created.</p><p> </p><p>If its limitation from excel then it should not create new sheet for the first report type also.</p>
micajblock
<p>As specified in the article, the limit is per sheet. So it makes perfect sense.</p>
hiren01it
<p>Yes limit is per sheet.</p><p>Its working as per limit in one report type. Its create new sheet.</p><p>But its not working in another report type. When no. of rows are larger than 65535. Reports is not generated and its throwing the [color=rgb(102,0,102);]NegativeArraySizeException.[/color]</p>
micajblock
<p>In the report that is working how is the new sheet created?</p>
hiren01it
<p>It creates automatically. There is no separate logic to create the sheet from our code.</p>
micajblock
<p>Does the report that works have grouping? And the one that does not have no grouping?</p>
hiren01it
<p>There is no grouping in the report.</p><p>Actually i found following thing. My report has following property:</p><p> </p><p><property name="layoutPreference">auto layout</property></p><p> </p><p>If i remove the auto layout then excel creates new sheet once first sheet reach to 65535 rows. But it shows only 8 columns even though i have 20 columns in the report.</p><p> </p><p>If i keep the auto layout then excel is not generated properly.It throws [color=rgb(102,0,102);font-size:14px;]NegativeArraySizeException[/color]</p>
micajblock
<p>I am taking a guess here that this is the way the emitter works. Is there a reason why you are using such an old release? In newer versions of BIRT there is also an XLSX emitter with no such limitations.</p>
hiren01it
<p>It was bug in Birt which was fixed in 3.7.2</p><p> </p><p><a data-ipb='nomediaparse' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=371602'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=371602</a></p>
;