Fill Color in Excel using Apache POI

In some previous posts we have seen how we can create excel and also add various fonts to the excel file using Apache POI.
Now we will see how to Fill Color in Excel using Apache POI.

For giving a cell background color we use the following

Lets see the complete code. In this code we will use 2 different cells, so that we can see difference of the fill patterns.

Output
fill color in excel using apache poi

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn