Java开源库生成数据透视表excel [英] Java open source library to generate pivot table out of excel

查看:1058
本文介绍了Java开源库生成数据透视表excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出一个excel文件,我想以编程方式生成一个数据透视表。我听说过Aspose.Cells,但它是付费版本。有人可以建议一些类似于Aspose.Cells的开放源代码库,或至少有任何教程链接,我可以通过编程方式获得一些帮助来生成数据透视表。

解决方案>

请尝试 https://github.com/jbaliuka/x4j-analytic ,它是开源的,它是为具有巨大细节表的枢轴报告而设计的。



还有其他几个开源库可以实现同样的功能,但是我们开发了这个库来解决性能问题,我们使用临时文件来避免不合理的内存消耗,并将XML写入流作为原始字节,以避免由XML API引起的开销。



查看样本 https://github.com/jbaliuka/x4j-analytic/blob/master/samples/src/test/java/x4j/samples/X4JEngineTest.java ,它需要XLSX模板,XML描述符和几行代码来实现基本的透视报表。


Given an excel file I want to generate a pivot table programmatically. I have heard of Aspose.Cells but it is paid version. Can someone suggest some open source libraries similar to Aspose.Cells or atleast any tutorial link where I can get some help to generate pivot table programmatically.

解决方案

Please try https://github.com/jbaliuka/x4j-analytic, it is open source and it is designed for pivot reports with huge details sheet.

There are several other open source libraries to achieve the same thing but we developed this library to workaround performance issues, we use temp file to avoid unreasonable memory consumption and write XML to stream as raw bytes to avoid overhead caused by XML API.

See samples https://github.com/jbaliuka/x4j-analytic/blob/master/samples/src/test/java/x4j/samples/X4JEngineTest.java, it needs XLSX template, XML descriptor and several lines of code to implement basic pivot report.

这篇关于Java开源库生成数据透视表excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆