XLS(MS Excel) Emitter for BIRT
For those who wanted an xls emitter for a long time, finally here may be a chance to taste. Thanks the Apache POI project and the new layout engine of BIRT 2.0, now we can easily create an xls emitter though it looks obviously not that fancy yet.
To install and use:
1. Install and run Birt correctly first. Since various api changed between 2.0RC and release version in birt engine, This plugin will only work with BIRT 2.0.0/2.0.1 final release(You need to download corresponding packages).
2. Extract the downloaded plugin file into the eclipse plugins directory.
3. Download Apahce POI library from apache site, put it in the /lib directory under the extracted xls plugin folder. You must donwload the latest 3.0 dev version, since the 2.5 release version doesn’t support the image output. A tested and recommended version is poi-3.0-alpha1-20050704.jar.
4. Download and apply the chart&designer&viewer patch file so to make the xls plugin work correctly both in the designer and viewer. If you are building BIRT from a CVS source tree, override the soure file; if you are just using the binary BIRT sdk, replace the class files in related plugin jar. Here is the list:
org.eclipse.birt.chart.reportitem org\eclipse\birt\chart\reportitem\ChartReportItemPresentationImpl in plugins/org.eclipse.birt.chart.reportitem_2.0.x/reportitem.jar
org.eclipse.birt.report.designer.ui org\eclipse\birt\report\designer\ui\actions\PreviewToolbarMenuAction in plugins/org.eclipse.birt.report.designer.ui_2.0.x/ui.jar
org.eclipse.birt.report.viewer org\eclipse\birt\report\viewer\aggregation\layout\EngineFragment in plugins/org.eclipse.birt.report.viewer_2.0.x/birt/WEB-INF/lib/viewservlets.jar
Though only three files are involved, this is just to make the designer/viewer simply work with the xls emitter. So the xls option will only appear in the preview toolbar action, sure you can apply your own patch to make it visible in the File menu as well.
5. Ok, now create a report as usual and choose preview as XLS, enjoy:)
Both binary and source are available now:).
For BIRT2.0.0
Download binary: http://qauck.host.sk/xls-emitter.zip
Download source: http://qauck.host.sk/xls-emitter-src.zip
For BIRT2.0.1
Download binary: http://qauck.host.sk/xls-emitter-bin_2.0.1.zip
Download source: http://qauck.host.sk/xls-emitter-src_2.0.1.zip
(If you have problem downloading the above files, try right click the link and select "save target as..." or use some web proxies.)
10 Comments:
Scott, sorry I don't get a chance to go ElipseCon. But feel free to use this in the demonstration.
Shawn
Hi, try right click the link and select "save target as..." or use some web proxies. The hosting sever seems not work well sometime, but I can do nothing.
imre, actually this is neither a bug of the emitter nor problem of your excel. The result depends on the output of BIRT layout engine. Briefly, for one cell, the layout engine doesn't just ouput one area, instead it splits the cell into several overlapped areas with varied sizes. However there is no way to know which area is really what you want.
But just be patient:), the next version will support a "use fixed column width" setting, then you could specify a column width manually and won't see so many dazzling columns.
Shawn
Great plugin! I did have a question on the Excel formatting though. This may just be due to this emitter being in development still.
I have a simple table in BIRT. 2 columns and a header title row. When run against my db it retrieves 2 data rows. When I export this to XLS using this emitter though, I would want (hope) to see 2 excel columns used and 3 rows. However, Excel actually uses 7 columns (blank columns are seen between the actual columns that contain text) and 4 rows. Based on the above comments, is this due to the emitter (or BIRT layout engine) actually trying to visually place things? as opposed to putting one data element in one cell? I have an example .xls file I can email if i'm not explaining well.
Will the 'constant column width' enhancment mentioned above solve this issue & put one data item in one cell and not run over into multiple columns?
Essentially, will it behave more like importing a .csv file in that case? If I export my BIRT table to .csv and then open in excel it opens as I would expect (uses 2 columns instead of 7).
Also, I would love to use the 'next version' as soon as possible. Is there any timeframe on when that will be released? Thanks
Rob
rmellor@vt.edu
hi,I use the xls emitter plugin in web system.when run in tomcat,the web app is ok,but when run in websphere6.0,the web app report the error,the message is can't instantiate class org.uguess.birt.report.engine.emitter.xls.XlsEmitter with property class.
What's problem?
There is a major bug on this plugin.
When exporting to excel a chart with multiple series. The emitter is supposed to export the source of each on of the series in a different column of the same sheet. How ever the data of the last series is reapated in the rest of the columns.
Will be this fixed any time soon??
There is a major bug on this plugin.
When exporting to excel a chart with multiple series. The emitter is supposed to export the source of each on of the series in a different column of the same sheet. How ever the data of the last series is reapated in the rest of the columns.
Will be this fixed any time soon??
Wilfred Maynham
Vichara Technologies
Wilfred, I'm not sure I've fully understood the question. Can you file a bug at Tribix projet site and attach a screenshot to elaborate a little more? thanks.
Hi, I installed the emitter and poi into my birt2.2.1 web application, birt engine and eclipse /plugin/, but when I tried to open the exported xls file, I got an Excel error: Problems came up in the following areas during load: Style.
Did I installed the emitter correctly? Please HELP!!! Thanks.
Yhe new version seems to solve the multiple column issue for xls emitter using "fixed_column_width". But i am still getting multiple rows for single cell of birt row, causing distracted output. Please suggest, is there a way to specify the fixed row height also?
Post a Comment
<< Home