我正在尝试使用ApachePOI从excel读取饼图/条形图的颜色和位置
这是密码
private static void readChartValues(XSSFSheet xsheet) {
XSSFDrawing drawing = xsheet.getDrawingPatriarch();
if (drawing != null) {
List<XSSFChart> chartList = drawing.getCharts();
for (int chartIndex = 0; chartList != null && chartIndex < (chartList.size()); chartIndex++) {
XSSFChart chart = chartList.get(chartIndex);
CTChart chart2 = chart.getCTChart();
CTPlotArea plot = chart2.getPlotArea();
List<CTPieChart> pieChartList = plot.getPieChartList();
}
}
}
有什么想法吗?
暂无答案!
目前还没有任何答案,快来回答吧!