导出为excel格式的Jasper报告未显示背景颜色 [英] Jasper report exported to excel format is not displaying the background colour
问题描述
我正在使用jasper reports-4.5.0。使用这个我正在生成报告并导出到不同的格式,如pdf,csv,xls,html。除.xls格式外,所有工作正常。当我将报告导出到.xls时,它不会向页眉头带显示背景颜色。我使用的代码如下。页面标题区内
I am using jasper reports-4.5.0 . Using this I am generating the reports properly and exporting to different formats like pdf,csv,xls,html. All are working fine except the .xls format. When I export my report to .xls it is not displaying the background colour to the pageheader band. The code I am using is as below. Inside the page header band
<image>
<reportElement mode="Opaque" x="0" y="0" width="236" height="57" backcolor="#E6E6E6"/>
<imageExpression><![CDATA[new File($P{Image}, "images/flower-logo.png")]]></imageExpression>
</image>
对于花卉图像,我正在应用背景颜色。除了.xls格式之外,它还有其他所有格式。可能是excel格式的问题。
To the flower image I am applying the background colour. It is coming in all the other formats except the .xls format. What could be the problem with excel format.
推荐答案
JasperReports XLS导出器仅支持标准的Excel调色板。我想你可以在这里看到颜色列表。 http://dmcritchie.mvps.org/excel/colors.htm
JasperReports XLS exporters only support the standard Excel color palette. I think you can see the color list here. http://dmcritchie.mvps.org/excel/colors.htm
这篇关于导出为excel格式的Jasper报告未显示背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!