Generic way of reading Excel file using Apache POI is a way of reading excel file in a dynamic configurable way to read an excel file where in future if you add more columns or remove columns from excel then you don’t need to almost touch the Java source code but you change the configurations that makes your life easier. Here we will see how we can define configurations in JSON file and read the excel file using Apache POI to establish mapping between JSON and Java POJO.
We have also seen Generic way of Excel file writing using Apache POI.
Obviously whenever you want to read or write to excel file you need to use Java Reflection API though it is not recommended to use Java Reflection API but in rare situations you may need to use Reflection.
You may also like to read:
The Apache POI is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft’s OLE 2 Compound Document format (OLE2). You can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is the Java Excel solution (for Excel 97-2008).