Excel2010中有一个“新”功能叫做“迷你图”。我找不到任何关于Apache POI的东西。看起来Apache POI不支持此功能。我说的对吗?
看起来像这样:
非常感谢!
发布于 2015-08-27 19:26:32
你说的完全正确!
Apache POI library不支持SparkLines或其他类型的图表,正如他们的limitations page中所解释的那样。
但是,如果您只想更改/读取/写入图表背后的数据,则无论如何都可以使用POI。
如果你想要或者需要一些其他的东西,比如改变图表数据的样式或范围,那么编写一些代码来管理这类图表并不是很难。
只需执行下一步:
<ext uri="{05C60535-1F16-4fd2-B633-F4F36F0B64E0}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main">
<x14:sparklineGroups xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">
<x14:sparklineGroup displayEmptyCellsAs="gap">
<x14:colorSeries theme="4" tint="-0.499984740745262"/>
<x14:colorNegative theme="5"/>
<x14:colorAxis rgb="FF000000"/>
<x14:colorMarkers theme="4" tint="-0.499984740745262"/>
<x14:colorFirst theme="4" tint="0.39997558519241921"/>
<x14:colorLast theme="4" tint="0.39997558519241921"/>
<x14:colorHigh theme="4"/>
<x14:colorLow theme="4"/>
<x14:sparklines>
<x14:sparkline>
<xm:f>Sheet3!A2:A25</xm:f>
<xm:sqref>B3</xm:sqref>
</x14:sparkline>
</x14:sparklines>
</x14:sparklineGroup>
</x14:sparklineGroups>
</ext>
在这里你可以编辑迷你图的样式信息和数据,就像你用ZIP want/need.
您可以使用代码来完成所有这些任务。
我希望这能帮到你
https://stackoverflow.com/questions/32205315
复制相似问题