Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 4th, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to get excel cell color in java
  2. Cell cell = row.getCell(6);
  3. CellStyle style = cell.getCellStyle();
  4. Color cellColor = (cell.getCellStyle().getFillBackgroundColorColor());
  5.        
  6. Color cellColor = (cell.getCellStyle().getFillBackgroundColorColor());
  7.        
  8. if(cellColor.equals(Color.GREEN)) {
  9.   //do whatever
  10. }