Create excel chart using Apache POI

前端 未结 6 912
小蘑菇
小蘑菇 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:27

    Here is the working example.

    • I have data in JSON, and .xlsm template file with macro. - no chart, data or range name needed in excel

    • Clones the template sheet every time it need to create a sheet with chart, places a required chart type at z1 and change default line chart which was inserted to appropriate chart type. Removes chart type from z1 to avoid multiple execution.

    Hope it helps.

提交回复
热议问题