Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Apache POI识别MS Excel中的要点_Java_Excel_Apache Poi - Fatal编程技术网

Java 使用Apache POI识别MS Excel中的要点

Java 使用Apache POI识别MS Excel中的要点,java,excel,apache-poi,Java,Excel,Apache Poi,我正在使用ApachePOI阅读MS Excel中的列,但代码无法识别要点。我正在尝试: String cellValue = cell.getStringCellValue(); if(cellValue.contains("•")){} 但这是行不通的。cellvalue在要点的情况下给出了一些垃圾值,这就是为什么在我的if条件下它无法进行比较 任何人都可以提出解决方案吗?您需要使用cell.getRichStringCellValue().getString(),然后检查\u2022,它

我正在使用ApachePOI阅读MS Excel中的列,但代码无法识别要点。我正在尝试:

String cellValue = cell.getStringCellValue();
if(cellValue.contains("•")){}
但这是行不通的。
cellvalue
在要点的情况下给出了一些垃圾值,这就是为什么在我的if条件下它无法进行比较


任何人都可以提出解决方案吗?

您需要使用
cell.getRichStringCellValue().getString()
,然后检查
\u2022
,它是“•”的unicode,请尝试使用cell.getRichStringCellValue().getString(),然后检查
\u2022
,它是“•”的unicode,这非常好。非常感谢你,加里!!很高兴它对你有用,请接受答案,这样对其他人会有帮助。