List of usage examples for org.apache.poi.hssf.usermodel HSSFChart getSheetCharts
public static HSSFChart[] getSheetCharts(HSSFSheet sheet)
From source file:com.haulmont.yarg.formatters.impl.XLSFormatter.java
License:Apache License
protected void copyCharts(HSSFSheet resultSheet) { HSSFChart[] sheetCharts = HSSFChart.getSheetCharts(resultSheet); if (sheetCharts == null || sheetCharts.length == 0) {//workaround for charts. If there is charts on sheet - we can not use getDrawPatriarch as it removes all charts (because does not support them) HSSFPatriarch drawingPatriarch = resultSheet.createDrawingPatriarch(); if (drawingPatriarch == null) { drawingPatriarch = resultSheet.createDrawingPatriarch(); }// w w w . j a va 2 s . c o m drawingPatriarchsMap.put(resultSheet, drawingPatriarch); } }