Well, you need to use Style.setForegroundColor() method instead with BackgroundType as SOLID pattern. Please see the updated code segment that works fine.
// First Header Row
if(i == 0){
System.out.println(“Header columns”);
cell = cells.get(i,0);
cell.putValue(“Report ID”);
Style style1 = cell.getStyle();
style1.setHorizontalAlignment(TextAlignmentType.CENTER);
style1.setVerticalAlignment(TextAlignmentType.CENTER);
style1.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style1.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style1.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style1.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style1.setForegroundColor(Color.getBlack());
style1.setPattern(BackgroundType.SOLID);
cell.setStyle(style1);
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());
// Program ID
cell = cells.get(i,1);
cell.putValue(“Program ID”);
Style style2 = cell.getStyle();
style2.setHorizontalAlignment(TextAlignmentType.CENTER);
style2.setVerticalAlignment(TextAlignmentType.CENTER);
//Setting the line of the top border
style2.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style2.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style2.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style2.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style2.setForegroundColor(Color.getYellow());
style2.setPattern(BackgroundType.SOLID);
cell.setStyle(style2);
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());
// Report Title
cell = cells.get(i,2);
cell.putValue(“Report Title”);
Style style3 = cell.getStyle();
style3.setHorizontalAlignment(TextAlignmentType.CENTER);
style3.setVerticalAlignment(TextAlignmentType.CENTER);
//Setting the line of the top border
style3.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style3.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style3.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style3.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style3.setForegroundColor(Color.getYellow());
style3.setPattern(BackgroundType.SOLID);
cell.setStyle(style3);;
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());
// From Date
cell = cells.get(i,3);
cell.putValue(“From Date”);
Style style4 = cell.getStyle();
style4.setHorizontalAlignment(TextAlignmentType.CENTER);
style4.setVerticalAlignment(TextAlignmentType.CENTER);
//Setting the line of the top border
style4.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style4.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style4.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style4.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style4.setForegroundColor(Color.getYellow());
style4.setPattern(BackgroundType.SOLID);
cell.setStyle(style4);
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());
// Report Format
cell = cells.get(i,4);
cell.putValue(“Report Format”);
Style style5 = cell.getStyle();
style5.setHorizontalAlignment(TextAlignmentType.CENTER);
style5.setVerticalAlignment(TextAlignmentType.CENTER);
//Setting the line of the top border
style5.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style5.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style5.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style5.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style5.setForegroundColor(Color.getYellow());
style5.setPattern(BackgroundType.SOLID);
cell.setStyle(style5);
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());
// Report Document
cell = cells.get(i,5);
cell.putValue(“Report Document”);
Style style6 = cell.getStyle();
style6.setHorizontalAlignment(TextAlignmentType.CENTER);
style6.setVerticalAlignment(TextAlignmentType.CENTER);
//Setting the line of the top border
style6.setBorder(BorderType.TOP_BORDER,CellBorderType.THIN,Color.getBlack());
style6.setBorder(BorderType.BOTTOM_BORDER,CellBorderType.THIN,Color.getBlack());
style6.setBorder(BorderType.LEFT_BORDER,CellBorderType.THIN,Color.getBlack());
style6.setBorder(BorderType.RIGHT_BORDER,CellBorderType.THIN,Color.getBlack());
style6.setForegroundColor(Color.getYellow());
style6.setPattern(BackgroundType.SOLID);
cell.setStyle(style6);
font = cell.characters(0, cell.getStringValue().length()).getFont();
font.setBold(true);
font.setColor(Color.getBlue());