I am using apache POI to change the styling of data in docx file. I am able to change the text styles on normal paragraphs but when it comes to the content that is present in table, it does not change.
public static void changeStyle(XWPFParagraph paragraph, Map<String, String> translation_keyDataMap,JSONObject style)
{
for (int runNumber = 0; runNumber < paragraph.getRuns().size(); runNumber++)
{
XWPFRun run = paragraph.getRuns().get(runNumber);
String runText= run.getText(0);
if(runText!=null)
{
runText=runText.replace(" "," ");
run.setColor(style.getString("color"));
run.setFontFamily(style.getString("font"));
}
}
}