创建使用Apache POI Excel图表 [英] Create excel chart using Apache POI
问题描述
我需要从我的Java code,其中包含像条形图,折线图等使用Apache POI库图表创建Excel工作表。
可能吗?
我无法找到同样的任何有用的code的例子。
I need to create excel sheet from my Java code which contains charts like Bar chart, Line Chart etc using the Apache POI library. Is it possible? I am not able to find any useful code example for the same.
对此有任何其他替代除了POI库的Java?
Is there any other alternative for this apart from POI library for Java?
推荐答案
您只能使用Excel模板preserve图与POI。
这意味着你创建一个有图表Excel模板文件和图表的数据源,链接到一个definedName,那么你可以加载POI的模板文件,并使用code键更改definedName。
目前POI不支持从头开始创建表。
You can only use Excel template to preserve chart with POI. It mean you create an Excel template file with chart in it and link the chart's datasource to one definedName,then you can load the template file from POI and using code to change the definedName. Current POI does not support to create Chart from scratch.
这篇关于创建使用Apache POI Excel图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!