ScatterChart - Apache POI Excel File Example

Q

What is ScatterChart example in the Apache POI package? How to run ScatterChart example?

✍: FYIcenter.com

A

ScatterChart example in the Apache POI package is created by Roman Kashitsyn. It illustrates how to create a simple scatter chart in *.xlsx format.

ScatterChart example uses the XSSF (OpenXML SpreadSheet Format) API, which supports Excel files in *.xlsx format only.

Here is the command to run ScatterChart to generate a sample *.xlsx file.

C:\fyicenter>c:\local\jdk-1.8.0\bin\java 
   -cp .;C:\local\poi-3.15\poi-examples-3.15.jar;
         C:\local\poi-3.15\poi-3.15.jar;
         C:\local\poi-3.15\poi-ooxml-3.15.jar;
         C:\local\poi-3.15\ooxml-lib\xmlbeans-2.6.0.jar;
         C:\local\poi-3.15\lib\commons-collections4-4.1.jar;
         C:\local\poi-3.15\poi-ooxml-schemas-3.15.jar 
   org.apache.poi.xssf.usermodel.examples.ScatterChart   

If you open the output file, ooxml-scatter-chart.xlsx, in Excel, you will see a nice chart graph:
Apache POI Excel File Example - ScatterChart

 

Apache POI Examples for Excel Files

⇒⇒FAQ for Apache POI (Poor Obfuscation Implementation)

2017-03-11, 471👍, 0💬