Posts

Showing posts from September, 2018

Create Excel file using Java: Apache POI - PART - 1: Writing data

Image
This series of posts are intended towards creating excel files in xlsx format using Java's Apache POI Library. In this post we will create a basic Java project which will put some random data in the Excel file. This post will cover basic features of Apache POI like: Creating a workbook Creating multiple sheets in a workbook Creating rows and cells in those rows and feeding data in them. Creating cell border styles and background colour styles, aligning text in the cell. Please note that, we are also using a Jackson library to read the data from a JSON file. This JSON file data will be then saved in to a JAVA entity class. We will use this java entity class objects to write the data into excel file. Hence this tutorial also covers a basic understanding of using Jackson library as well.