使用 PHP 和 SQL 生成带有统计图和饼图的 Excel 文件?
我有一个包含大量数字统计相关信息的数据库,我希望在 Excel 文件中生成这些信息。
首先,你们中有人有使用任何流行的库/脚本来生成 Excel 文件的经验吗?
其次,我认为在饼图和图表中显示一些非常枯燥乏味的数字会很酷。再说一次,你们中有人有使用任何流行的库/脚本在 excel 文件中生成此类内容的经验吗?
多谢!
I got a database with a lot of number statistical related info, which i'm looking to generate out in an excel file.
So first of all of all, do anyone of you have experience with any popular libraries/scripts to generate excel files?
Secondly, im thinking it would be cool to display some of these very dull and boring numbers, in pie charts and graphs. Again, do anyone of you have experience with any popular libraries/scripts to generate such things inside an excel file?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 PHPExcel 库 - http://phpexcel.codeplex.com/
它满足了我的所有需求,包括您的需求指定,但不仅限于它们。
不过,可能需要稍微增加内存限制,因为在大数据情况下,您指定的数据会消耗大量内存。
Try PHPExcel library - http://phpexcel.codeplex.com/
It satisfied all my needs, including the ones you specified, but not limited to only them.
Might need to increase memory limit a bit though since in large data cases as the one you specified it consumes a significant amount of memory.
我可以支持 PHPExcel 库,我过去已经使用过它几次,而且效果很好。不幸的是,据我所知,你不能用它创建图表。之前有人提出过这个问题,也许你会在这里找到一些有用的东西
以编程方式创建 Excel 图表PHP
I can second the PHPExcel library, I have used it a couple of times in the past and it works great. Unfortunately you cannot create charts with it as far as I remember. Someone else brought up this question before, maybe you will find something helpful here
Create Excel chart programmatically in PHP