Excel allows the colour of header and footer text to be specified. A header displaying "test test test" with the middle "test" in red will be stored as follows: test &KFF0000test&K01+000 test org.apache.poi.hssf.usermodel.HeaderFooter.stripFields() removes formatting tags from headers and footers, but this is missed. This patch removes these colour formatting tags by adding the following new regexes after the existing ones text = text.replaceAll("\\&K[\\dA-F]{6}", ""); text = text.replaceAll("\\&K[\\d]{2}[+][\\d]{3}", ""); An example of an Excel file with this an other formatting is used for a unit test
Created attachment 38047 [details] Patch This patch is a gzipped tar containing the subversion diff and a test file used for the unit test
Thanks - committed with r1893599