在 ms word(97-2003) 中导出报告,而不在 jasper 报告中使用 RTFExporter
我有一份报告需要使用 jasper 报告以纯文字格式(97-2003)导出。但是 Jasper 使用 RTFExporter 以 doc 格式导出报告,当我使用 POI 阅读报告时,它会抛出错误,说它不是纯单词。任何人都可以帮助如何使用 Jasper 报告生成 Word 报告。请帮忙!
I have a report which needs to be exported in pure word format(97-2003) using jasper report. But Jasper uses RTFExporter for exporting report in doc format, wen i read the report using POI, it throws error saying its not pure word. Can anyone help how to generate a report in word using Jasper reports. Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很确定你无法做任何比 Jasper 的 RTF 更接近的事情。如果您无法替换 Jasper 报告,那么您需要找到能够读取 RTF 并将其呈现为 DOC 的文件。
您可以使用 Docmosis 读取 RTF 并输出 DOC。 Docmosis 基于 OpenOffice 和 Java,OpenOffice 具有非常令人印象深刻的过滤器,可以以不同的格式保存。此外,大多数平台都受支持,因为您没有提到对您运行的系统类型的任何限制。
I'm pretty sure you can't do anything closer than RTF from Jasper. If you can't replace the Jasper report, then you need to find something that will read the RTF and render it as a DOC.
You could use Docmosis to read the RTF and spit out a DOC. Docmosis is based on OpenOffice and Java and OpenOffice has pretty impressive filters for saving in different formats. Also, most platforms are supported since you haven't mentioned any limitations on what type of system you are running on.
Aspose.Total 将允许您从 Jasper 生成 .doc 文件。
不过,它看起来相当昂贵。
Aspose.Total will allow you to generate .doc files from Jasper.
It looks quite expensive, though.