For my project, I'm utilizing Java 8, Excel, and Apache POI. I'm interested in utilizing Java to extract certain cell values from Excel. I'm attempting to identify text that has been struck out in excel cells, but I'm having trouble because the text's format is a little different.
Below is how data is laid out in my excel sheet:
After extacting this data from excel, I always save it in string arraylist format like this a = [text 1, text 2, text 3]. code is mentioned below if you want to see how I am storing data in this arraylist.
What I want:
I want to ignore all those texts which are strikeout, so in the above case, I expect to have an output like this [text 2, text 3] for the first picture and second picture.
What I tried:
For the sake of just detecting strikeout values, I tried the below code first:
XSSFRichTextString text = new XSSFRichTextString(a.get(0));
XSSFFont font = text.getFontAtIndex(0);
Boolean font_striked = font.getStrikeout();
But it's not working properly. Can someone please help me with this?