### JAVA Excel POI, Cell Style 배경색 채우기 Excel Form 만들때, 아래 처럼 Cell에 Style을 넣을 수 있다. 아래 예제는 Cell에 배경색을 넣는 예제이다. String color = "#FF0F0F"; //16진수값을 R,G,B값으로 변환 int colorR = Integer.parseInt( color .substring(1, 3), 16); int colorG = Integer.parseInt( color .substring(3, 5), 16); int colorB = Integer.parseInt( color .substring(5, 7), 16); //직접 RGB 컬러값을 사용하는 경우 아래와 같이 getCustomPalette()를 사용해야 컬러값이 적용된다. palette = workbook .getCustomPalette(); HSSFColor myColor = palette .findSimilarColor( colorR , colorG , colorB ); //cell에 style 만들기 style = workbook .createCellStyle(); style .setFillForegroundColor( myColor .getIndex()); //위에 컬러값의 index값으로 칼라값을 지정해주게된다. style .setFillPattern(HSSFCellStyle. SOLID_FOREGROUND ); //컬러가 cell에 적용되는 style 정의 cell .setCellStyle( style ); //style을 cell에 적용 //cell에 표시할 value 값을 적용 HSSFRichTextString text = new HSSFRichTextString( value ); ...