SANKALP sharma
SANKALP sharma

Reputation: 81

Identify bullet points in MS Excel using Apache POI

I am reading columns in MS Excel using Apache POI but the code is not able to identify bullet point. I am trying this:

String cellValue = cell.getStringCellValue();
if(cellValue.contains("•")){}

but this is not working. the cellvalue is giving some garbage value in case of bullet point and this is why it is not able to compare in my if condition.

Can anyone please suggest solution ?

Upvotes: 1

Views: 1004

Answers (1)

Garry
Garry

Reputation: 4543

You need to use cell.getRichStringCellValue().getString() and then check for \u2022 which is unicode for "•"

Upvotes: 2

Related Questions