Illegal xml character breakes .xlsx file
I'm pretty new programming with POI, but I'm having a problem. I'm generating a xlsx file using SXSSFWorkbook. This file contains Facebook posts and comments from my pages. All comments are stored and treated as Strings.
The problem is that, in some cases, some posts come with strange characters, as vertical tabs (ASCII control character number 11). When I try to open this file with MS Excel, I receive a first message telling that the file contains unreadable content and asks me if I want to recover the contents of the workbook. If I click YES, another message appears telling me that Excel could open the file by removing the unreadable content. I'm attaching both screenshots.
Do any of you have any idea of how to avoid these kind of messages from Excel, and obviously avoid losing data, as well.
Thanks in advance!
Re: Illegal xml character breakes .xlsx file
Parse the data beforehand and strip out or replace the unreadable characters?