private static String renderColor(Color color) { if(color instanceof HSSFColor) { return ((HSSFColor)color).getHexString(); } else if(color instanceof XSSFColor) { return ((XSSFColor)color).getARGBHex(); } else { return "(none)"; } } }
private String getCellFillBackground(Locator loc) { Color col = loc.cell.getCellStyle().getFillForegroundColorColor(); return (col instanceof XSSFColor) ? ((XSSFColor)col).getARGBHex() : "NO COLOR"; }
if (cellColor instanceof XSSFColor) { XSSFColor xssfCellColor = (XSSFColor) cellColor; if(xssfCellColor.getARGBHex().equals(new XSSFColor(java.awt.Color.GREEN).getARGBHex())) { System.out.print(0+","); } else if(xssfCellColor.getARGBHex().equals(new XSSFColor(java.awt.Color.YELLOW).getARGBHex())) { System.out.print(1+",");
System.out.println("Font color : " + color.getARGBHex());
XSSFColor xssfCellColor = (XSSFColor) cellColor; System.out.println(xssfCellColor.getARGBHex()); if(xssfCellColor.getARGBHex().equals(new XSSFColor(java.awt.Color.GREEN).getARGBHex())) { System.out.println(cell.getAddress() + " is green"); } else if(xssfCellColor.getARGBHex().equals(new XSSFColor(java.awt.Color.YELLOW).getARGBHex())) { System.out.println(cell.getAddress() + " is yellow");
if (co != null && "FFFF0000".equals(co.getARGBHex())) { compare.add(value);
String argbHex = color.getARGBHex(); if (argbHex != null) { styleBuilder.foreground(argbHex.substring(2)); String argb = ((XSSFColor) color).getARGBHex(); if (argb != null) { styleBuilder.background(argb.substring(2));
String argbHex = color.getARGBHex(); if (argbHex != null) { styleBuilder.foreground(argbHex.substring(2)); String argb = ((XSSFColor) color).getARGBHex(); if (argb != null) { styleBuilder.background(argb.substring(2));
final String argb = fillForegroundXSSFColor.getARGBHex(); if (argb != null) { _style.background(argb.substring(2)); String argbHex = fontColor.getARGBHex(); if (argbHex != null) { _style.foreground(argbHex.substring(2));
XSSFColor fillForegroundXSSFColor = style .getFillForegroundXSSFColor(); String argb = fillForegroundXSSFColor.getARGBHex(); if (argb != null) { _style.background(argb.substring(2)); String argbHex = fontColor.getARGBHex(); if (argbHex != null) { _style.foreground(argbHex.substring(2));
String argbHex = color.getARGBHex(); if (argbHex != null) { styleBuilder.foreground(argbHex.substring(2)); String argb = ((XSSFColor) color).getARGBHex(); if (argb != null) { styleBuilder.background(argb.substring(2));
final String argb = fillForegroundXSSFColor.getARGBHex(); if (argb != null) { _style.background(argb.substring(2)); String argbHex = fontColor.getARGBHex(); if (argbHex != null) { _style.foreground(argbHex.substring(2));
String rgb=color.getARGBHex(); style.setForecolor(hex2Rgb(rgb)); }else{ XSSFColor bgcolor=cellStyle.getFillForegroundColorColor(); if(bgcolor!=null){ String hex=bgcolor.getARGBHex(); style.setBgcolor(hex2Rgb(hex));