Replace text in excel xlsx file with Apache POI
<p>I just found Apache POI library very useful for editing Word files using Java. Now I want to replace some text (tag) in my XLSX file with some other text. 
Is there some function which iterrate over xlsx document? 
example to replace some text with other for word file:</p>

<pre><code>static void replaceTag(String tagName, String value) throws Exception {
    for (XWPFParagraph p : doc.getParagraphs()) {
        List&lt;XWPFRun&gt; runs = p.getRuns();
        if (runs != null) {
            for (XWPFRun r : runs) {
                String text = r.getText(0);
                if (text != null &amp;&amp; text.contains(tagName)) {
                    text = text.replace(tagName, value);
                    r.setText(text, 0);
                }
            }
        }
    }
   for (XWPFTable tbl : doc.getTables()) {
        for (XWPFTableRow row : tbl.getRows()) {
            for (XWPFTableCell cell : row.getTableCells()) {
                for (XWPFParagraph p : cell.getParagraphs()) {
                    for (XWPFRun r : p.getRuns()) {
                        String text = r.getText(0);
                        if (text.contains(tagName)) {
                            text = text.replace(tagName, value);
                            r.setText(text);
                        }
                    }
                }
            }
        }
    }
}
</code></pre>

<p>Thanks in Advance :)</p>