Without any form of GUI, which set of classes should be used to represent formatted text in memory?

I have an application that I am writing that reads a docx file. It seems like I might need to read the formatting of the text, not just the content. I searched for this question, but found a search query that found me what I am looking for, and most of them tell me to use formatted text inputs, etc.

Does anyone know which class I should use?

+4
source share
1 answer

Apache poi should give you (at least some) access to Excel styles - for example, colors, fonts, etc. I'm not sure about exotic cases, but, of course, you can get the font color of the cell. The following code works for me:

XSSFCell cell = ... if (IndexedColors.WHITE.getIndex() == cell.getCellStyle().getFont().getColor()) { ... } 
0
source

Source: https://habr.com/ru/post/1389488/


All Articles