2

我正在尝试将报告导出为 xls,但是当我打开导出的文件时,我注意到所有单元格格式都是数字,并且所有数据都用 ' 写入,如文本数据(整数字段和双字段也......)所以我不能在 Excel 中应用任何公式,如 SUM。

如何根据我的 iReport TextField 类表达式保持单元格格式?

我正在使用 iReport 4.0.2。

谢谢大家。

4

2 回答 2

3

我一直在寻找同样的问题,发现以下问题:

http://jasperreports.sourceforge.net/sample.reference/xlsformula/index.html

您可以在 ireport 的导出 excel 设置下将“检测单元格类型”设置为默认 true。

问候

于 2011-10-17T13:15:48.453 回答
0

在你的<textField>元素中使用这个:

<reportElement x="0" y="0" width="100" height="20" uuid="fb1a31bf-e600-4ed0-8eb1-2e48f82b90ce">
  <property name="net.sf.jasperreports.export.xls.pattern" value="0.00"/>
</reportElement>

value="..."你的细胞模式在哪里。

于 2016-10-13T07:14:10.280 回答