Excel Cells Fills and colors example using Apache POI

This example shows you Excel cell fills and colors using Apache POI. In our example i have used all the possible colors and set it as Fills background colors of cells. Below is the example code. package com.java.connect.poi; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import […]

Continue reading


Add cells values in excel using apache POI

This example shows you how to add the cells into excel file and put some string values inside those cells using Apache POI framework. Below is the example code, which is creating the workbook, and creating three cells and putting some string values inside cells. package com.java.connect.poi; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; […]

Continue reading