// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); worksheet.getRange("A1:B7").setValue(new Object[][]{ {"Stage", "Amount"}, {"Prospects", 500}, {"Qualified prospects", 425}, {"Needs analysis", 200}, {"Price quotes", 150}, {"Negotiations", 100}, {"Closed sales", 90} }); //Set cell style. worksheet.getRange("A:A").getColumns().autoFit(); worksheet.getRange("B2:B7").setNumberFormat("$#,##0.00"); //Create a funnel chart. IShape shape = worksheet.getShapes().addChart(ChartType.Funnel, 10, 150, 300, 200); shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:B7")); //Set funnel style. shape.getChart().getChartTitle().setText("Funnel Chart"); for (ISeries iSeries : shape.getChart().getSeriesCollection()) { iSeries.getDataLabels().getFont().getColor().setRGB(Color.GetWhite()); } // Save to a pdf file workbook.save("FunnelChartPdf.pdf");