Create excel chart using Apache POI

前端 未结 6 935
小蘑菇
小蘑菇 2020-12-09 17:49

I need to create excel sheet from my Java code which contains charts like Bar chart, Line Chart etc using the Apache POI library. Is it possible? I am not able to find any u

6条回答
  •  孤城傲影
    2020-12-09 18:04

    This will be extremely complicated to do from scratch, as you will have to figure out what needs to go in the Excel file to create the charts. I would go a different route.

    Create an Excel file that includes a macro that creates the Bar Chart etc for some data (using Excel in the usual way). Then use Apache POI to create a file with the data you want and start Excel from Java, executing the macro that creates the charts.

提交回复
热议问题