import jpype import asposecells jpype.startJVM() from asposecells.api import Workbook, CellsHelper, FileFormatType, ChartType, License # Instantiating a Workbook object workbook = Workbook(FileFormatType.XLSX) # Obtaining the reference of the first worksheet worksheet = workbook.getWorksheets().get(0) worksheet.getCells().get("A2").putValue("Category1") worksheet.getCells().get("A3").putValue("Category2") worksheet.getCells().get("A4").putValue("Category3") worksheet.getCells().get("B1").putValue("Radar") worksheet.getCells().get("B2").putValue(300) worksheet.getCells().get("B3").putValue(400) worksheet.getCells().get("B4").putValue(200) # Adding a Radar chart to the worksheet chartIndex = worksheet.getCharts().add(ChartType.RADAR, 6, 2, 22, 10) # Accessing the instance of the newly added chart chart = worksheet.getCharts().get(chartIndex) # Setting chart data source as the range "A1:B4" chart.setChartDataRange("A1:B4", True); # Save the Workbook as .xlsx file. workbook.save("output.xlsx");