[英]How can I get images into my Excel reports with BIRT?
我有一些报告的图像看起来很像网页或PDF,但是在Excel中打开该报告时这些图像不会消失。
What is your birt version? 您的Birt版本是什么? Images are supported in Excel only from birt 4.3, with spudsoft xls & xlsx emitters. Excel仅在birt 4.3中支持带有spudsoft xls和xlsx发射器的图像。 For older versions that's quite more tricky but we can still inlcude these emitters, or the native excel emitter . 对于较旧的版本,这比较棘手,但我们仍然可以包括这些发射器或本机excel发射器 。
Use the Native Excel Emitter for Excel format, instead of default excel emitter. 使用Excel的本机Excel发射器,而不是默认的excel发射器。
You can download plugin from here : 您可以从这里下载插件:
Extract the jar using any of any of the archive software(eg. winzip, 7-zip,etc) and keep it separately. 使用任何存档软件(例如winzip,7-zip等)解压缩jar,并将其分开保存。
After extracting the jar file, copy the 'jar' files in your own project's folder ( webapp/web-inf/lib
). 解压缩jar文件后,将“ jar”文件复制到您自己项目的文件夹( webapp/web-inf/lib
)中。
And also add the original downloaded jar ( org.eclipse.birt.report.engine.emitter.nativexls.jar
) into your project's folder ( webapp/web-inf/lib
). 并将原始下载的jar( org.eclipse.birt.report.engine.emitter.nativexls.jar
)添加到项目的文件夹( webapp/web-inf/lib
)中。
And add the class path (Right click Project → Configure Build Path → Add Jar → Select the jar files you have added from the lib
folder). 并添加类路径(右键单击Project→配置构建路径→Add Jar→从lib
文件夹中选择已添加的jar文件)。
Note: For Maven Projects only 注意:仅适用于Maven项目
If you are using Maven Projects, then you should add the jar files in your maven repository. 如果您使用的是Maven项目,则应将jar文件添加到您的maven存储库中。
In command prompt, type the following commands: 在命令提示符下,键入以下命令:
mvn install:install-file -Dfile=c:\kaptcha.jar -DgroupId=com.google.code
-DartifactId=kaptcha -Dversion={version} -Dpackaging=jar
Instead of follow the step 4, follow the below steps: 代替按照步骤4,请按照下列步骤操作:
You should also add the jar files which is extracted from the org.eclipse.birt.report.engine.emitter.nativexls.jar
(in lib folder) 您还应该添加从org.eclipse.birt.report.engine.emitter.nativexls.jar
(在lib文件夹中)提取的jar文件。
In java, under the Excel Format option, add the following line also: 在Java中,在“ Excel格式”选项下,还添加以下行:
ExcelRenderOption option=new ExcelRenderOption();
option.setOption(IRenderOption.EMITTER_ID,"org.eclipse.birt.report.engine.emitter.nativexls");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.