Results 1 to 2 of 2
  1. #1
    nmirra is offline Member
    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Default Illegal xml character breakes .xlsx file

    Hi!
    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!
    Attached Thumbnails Attached Thumbnails Illegal xml character breakes .xlsx file-error1.jpg   Illegal xml character breakes .xlsx file-error2.jpg  

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default Re: Illegal xml character breakes .xlsx file

    Parse the data beforehand and strip out or replace the unreadable characters?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. save XML file as .xlsx
    By prutser in forum Apache POI
    Replies: 2
    Last Post: 04-23-2012, 10:51 AM
  2. Pattern: illegal escape character
    By coltx in forum New To Java
    Replies: 6
    Last Post: 01-10-2011, 09:26 PM
  3. illegal character: \8233
    By 13ponchera in forum New To Java
    Replies: 3
    Last Post: 10-06-2010, 07:32 AM
  4. illegal character: \92
    By jlgraham in forum New To Java
    Replies: 3
    Last Post: 06-29-2008, 09:04 AM
  5. illegal character: \65279
    By iwax in forum New To Java
    Replies: 3
    Last Post: 01-30-2008, 02:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •