Java 如何在Excel中检索单元格的颜色?
我尝试了很多可能性。但我无法找到确切的颜色。 Apache POI版本:4.0.1 下面是一些例子Java 如何在Excel中检索单元格的颜色?,java,apache-poi,Java,Apache Poi,我尝试了很多可能性。但我无法找到确切的颜色。 Apache POI版本:4.0.1 下面是一些例子 row.getCell(0).getCellStyle().getFillBackgroundXSSFColor().getARGBHex() 输出:每种颜色为空 row.getCell(0).getCellStyle().getFillBackgroundColor() 输出:每种颜色64 row.getCell(0).getCellStyle().getFillForegroundColo
row.getCell(0).getCellStyle().getFillBackgroundXSSFColor().getARGBHex()
输出:每种颜色为空
row.getCell(0).getCellStyle().getFillBackgroundColor()
输出:每种颜色64
row.getCell(0).getCellStyle().getFillForegroundColor()
输出:0
row.getCell(0).getCellStyle().getFillBackgroundColorColor()
输出:org.apache.poi.xssf.usermodel。XSSFColor@4813bcba
row.getCell(0).getCellStyle().getFillForegroundColorColor()
输出:org.apache.poi.xssf.usermodel。XSSFColor@c04a46bbSelenium与excel无关。您好,Ramakarishna,请检查
行的结果有什么问题。getCell(0)。getCellStyle()。getFillBackgroundColorColor()
?是不是颜色不对?@SteffenJacobs我不确定这是什么(org.apache.poi.xssf.usermodel)。XSSFColor@4813bcba)颜色是。请尝试.getRGB()
而不是.getARGB()