The below code shows how to write a simple Excel file using Apache POI libraries. The code uses a 2 dimensional data array to hold the data. Apache POI is one of them and is well trusted over time. In short, you can read and write MS Excel files using Java. In addition, you can read. Although it is not an opened file format, Java applications can still read and write Excel files using the Apache POI - the Java API for Microsoft.