Home
Analytics
birt generated filename.xls not opening in ipad
Trackbrood
Not able to open the Birt generated filename.xls file in ipad (ios in general) need help. should i add other emitter or i need to install a standard application in ipad so that ipad can read the report.Please Help
Thanks
amit
Find more posts tagged with
Comments
ahsiang
Try download CloudOn from App Store and see if it can open the file
Trackbrood
Thanks for reply. As birt generated xls files are actual xml file with .xls extension.safari is not able to open the file. but if i try to open .xls file generated by ms office then it open in safari. Can you please suggest me how can i use a third party emitter and change the generated file so that safari can directly open it.
i tried this
EXCELRenderOption xlsOptions = new EXCELRenderOption(options);
xlsOptions.setOutputFormat("xls");
response.setHeader( "Content-Disposition", "attachment; filename="+downloadFileName);
xlsOptions.setImageHandler(new HTMLServerImageHandler());
xlsOptions.setOutputStream(response.getOutputStream());
//org.eclipse.birt.report.engine.emitter.prototype.excel
//xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.uguess.birt.report.engine.emitter.xls");
xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.eclipse.birt.report.engine.emitter.prototype.excel");
iRenderTask.setRenderOption(xlsOptions);
iRenderTask.render();
//close task and doc
iRenderTask.close();
reportDoc.close();
But it gives me the same, file with .xls extension and not able to open on ipad(ios). Your suggestion would be vary helpful
Yaytay
<blockquote class='ipsBlockquote' data-author="'Trackbrood'" data-cid="116329" data-time="1367071808" data-date="27 April 2013 - 07:10 AM"><p>
Thanks for reply. As birt generated xls files are actual xml file with .xls extension.safari is not able to open the file. but if i try to open .xls file generated by ms office then it open in safari. Can you please suggest me how can i use a third party emitter and change the generated file so that safari can directly open it.<br />
<br />
i tried this <br />
<br />
EXCELRenderOption xlsOptions = new EXCELRenderOption(options); <br />
xlsOptions.setOutputFormat("xls"); <br />
response.setHeader( "Content-Disposition", "attachment; filename="+downloadFileName); <br />
xlsOptions.setImageHandler(new HTMLServerImageHandler()); <br />
xlsOptions.setOutputStream(response.getOutputStream()); <br />
//org.eclipse.birt.report.engine.emitter.prototype.excel<br />
//xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.uguess.birt.report.engine.emitter.xls"); <br />
xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.eclipse.birt.report.engine.emitter.prototype.excel"); <br />
iRenderTask.setRenderOption(xlsOptions); <br />
<br />
<br />
iRenderTask.render();<br />
//close task and doc<br />
iRenderTask.close();<br />
reportDoc.close();<br />
<br />
But it gives me the same, file with .xls extension and not able to open on ipad(ios). Your suggestion would be vary helpful<br /></p></blockquote>
<br />
My first suggestion would be to avoid the Tribix Excel emitter if possible, if you are using at least BIRT 2.5.2 the Other open source emitters are much better ( and are actively maintained).<br />
I am biased, I wrote the <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters'>SpudSoft
emitters</a>, but I only did hat because of the issues with Tribix.<br />
<br />
How are you running BIRT? Are you using the report engine in your own application?<br />
How I'd yo install the emitter?<br />
How did yo nstall it's dependency?<br />
<br />
Jim
Yaytay
<blockquote class='ipsBlockquote' data-author="'Trackbrood'" data-cid="116329" data-time="1367071808" data-date="27 April 2013 - 07:10 AM"><p>
Thanks for reply. As birt generated xls files are actual xml file with .xls extension.safari is not able to open the file. but if i try to open .xls file generated by ms office then it open in safari. Can you please suggest me how can i use a third party emitter and change the generated file so that safari can directly open it.<br />
<br />
i tried this <br />
<br />
EXCELRenderOption xlsOptions = new EXCELRenderOption(options); <br />
xlsOptions.setOutputFormat("xls"); <br />
response.setHeader( "Content-Disposition", "attachment; filename="+downloadFileName); <br />
xlsOptions.setImageHandler(new HTMLServerImageHandler()); <br />
xlsOptions.setOutputStream(response.getOutputStream()); <br />
//org.eclipse.birt.report.engine.emitter.prototype.excel<br />
//xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.uguess.birt.report.engine.emitter.xls"); <br />
xlsOptions.setOption(IRenderOption.EMITTER_ID, "org.eclipse.birt.report.engine.emitter.prototype.excel"); <br />
iRenderTask.setRenderOption(xlsOptions); <br />
<br />
<br />
iRenderTask.render();<br />
//close task and doc<br />
iRenderTask.close();<br />
reportDoc.close();<br />
<br />
But it gives me the same, file with .xls extension and not able to open on ipad(ios). Your suggestion would be vary helpful<br /></p></blockquote>
<br />
My first suggestion would be to avoid the Tribix Excel emitter if possible, if you are using at least BIRT 2.5.2 the Other open source emitters are much better ( and are actively maintained).<br />
I am biased, I wrote the <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters'>SpudSoft
emitters</a>, but I only did hat because of the issues with Tribix.<br />
<br />
How are you running BIRT? Are you using the report engine in your own application?<br />
How I'd yo install the emitter?<br />
How did yo nstall it's dependency?<br />
<br />
Jim
Trackbrood
Thanks Jim, i am able to get binary xls document using the SpudSoft emitters. i am using the report engine api (integration of sping 3.1 and birt 4.2.2)
steps followd to get it working
1)deleated poi from org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar in WEB-INF/lib
2)Added poi-3.9-20121203.jar,poi-ooxml-3.9-20121203.jar,poi-ooxml-schemas-3.9-20121203.jar,poi-scratchpad-3.9-20121203.jar and uk.co.spudsoft.birt.emitters.excel_0.8.0.201304272008.jar to WEB-INF/lib
but the issue i am facing right now is that earlier the default emitter was allowing me to have styling in the sheet like specifying the width of the column and adding blank line in the xls file. but after replacing the emitter it does not support that.
problems faced
1)not able to add blank line in the excel sheet.
2)adding a data set in the layout of the .rptdesign, excel generated is able to show only 41 rows per sheet later records are shown on the subsequent sheets.
3)if i add a header in the beginning merging 2 or 3 cells the merge is not limited to the particular row it is applicable to whole sheet.
4)adding a data set to layout in .rptdesign, if the table header characters are more than the table details characters the the table header is not fully visible. the max length of table details is taken.
Thanks again jim for the emitter, please help on the issues.
Thanks Amit
Yaytay
<blockquote class='ipsBlockquote' data-author="'Trackbrood'" data-cid="116415" data-time="1367498392" data-date="02 May 2013 - 05:39 AM"><p>
problems faced<br />
<br />
1)not able to add blank line in the excel sheet.<br />
2)adding a data set in the layout of the .rptdesign, excel generated is able to show only 41 rows per sheet later records are shown on the subsequent sheets.<br />
3)if i add a header in the beginning merging 2 or 3 cells the merge is not limited to the particular row it is applicable to whole sheet.<br />
4)adding a data set to layout in .rptdesign, if the table header characters are more than the table details characters the the table header is not fully visible. the max length of table details is taken. <br /></p></blockquote>
<br />
1) if your report design causes a blank row to b output it will go into the sheet at a blank row.<br />
So you can get a blank row by adding a blank label (usually outside of any tables).<br />
You can also set a RenderOption of "ExcelEmitter.BlankRowAfterTopLevelTable" with a value of TRUE and it will nest a blank row after each non-nested table.<br />
<br />
2) In the designer, select the table, go to the Page Break property tab an change "Page Break Interval" from 40 to 0.<br />
<br />
3) Either I don't understand what you mean or that's a bug.<br />
Can you upload an example that show this based on the BIRT sample Data Source?<br />
<br />
4) That's a feature.<br />
You know how big your headers are, so if you want the columns that wide just make them wide enough n the design.<br />
You don't know how big you content data will be, so I only base auto column width calculations on that data.<br />
You also have the option of rotating the headers if you want.<br />
<br />
Jim
Trackbrood
Thanks Jim for the solutions,
The first and second and forth issue is solved but the third one causing problem,
1)For the first issue, earlier to get a blank line i used to insert a grid with the number and size of columns as that of the data set with a blank label in any one of the grid columns. but now by adding a blank label i am able to get blank row
2)And the second solution also works changing the page break property of the table from 40 to 0
3) This still remains an issue as i am adding a grid at the second row merging 2 or 3 columns it will take the merged columns for the entire sheet i have also added a excel generated by birt please check it. In the grid where the cells are merged i am adding one label one dynamic text and one more label for 3 column grid.
I think the grid is causing the problem.
Thanks,
Amit
Yaytay
<blockquote class='ipsBlockquote' data-author="'Trackbrood'" data-cid="116438" data-time="1367572828" data-date="03 May 2013 - 02:20 AM"><p>
3) This still remains an issue as i am adding a grid at the second row merging 2 or 3 columns it will take the merged columns for the entire sheet i have also added a excel generated by birt please check it. In the grid where the cells are merged i am adding one label one dynamic text and one more label for 3 column grid.<br /></p></blockquote>
I'm sorry, I'm still not understanding what the problem is.<br />
In the XLS you've attached there are no merged cells.<br />
<br />
Which cells are you expecting to be merged?<br />
Which cells are you actually getting merged?<br />
<br />
Jim
Trackbrood
sorry jim, i forgot to add the .rptdesign file, but now when i am trying to upload it its giving error even after changing the extension, so i added a screen shot of the .rptdesign file,
In the 2nd row i am adding a grid with 3 columns merging 4 columns, as there are 6 columns in the data set. so the column with last name in the data set is getting expanded
Thanks,
Amit
Yaytay
<blockquote class='ipsBlockquote' data-author="'Trackbrood'" data-cid="116443" data-time="1367579481" data-date="03 May 2013 - 04:11 AM"><p>
I'm confused by your spreadsheet not having any merged cells in it at all.<br />
<br />
The report design and resultant XLSX file I've attached here show what I expect to happen.<br />
Can you try running this report in your environment to see what you get out?<br />
<br />
What version of BIRT are you using?<br />
What version of the emitter are you using?<br />
<br />
Jim<br /></p></blockquote>
Trackbrood
thanks jim , your .rptdesign is working in my environment,actually i was not following the correct way of merging the cells in .rptdesign, after looking at your design file got the idea to merge the cells.
But after merging the cells the row also is getting merged, whenever there is merging of cells the row height is bigger even if i try reducing the height of the row it still displays the the same height. It also happens to your .rptdesign file after generating excel.
Thanks,
Amit