You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/04/30 08:53:33 UTC

[Bug 54907] New: Unreadable content error when reading .xlsx with external links containing U+3000('IDEOGRAPHIC SPACE') character.

https://issues.apache.org/bugzilla/show_bug.cgi?id=54907

            Bug ID: 54907
           Summary: Unreadable content error when reading .xlsx with
                    external links containing U+3000('IDEOGRAPHIC SPACE')
                    character.
           Product: POI
           Version: 3.9
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLF
          Assignee: dev@poi.apache.org
          Reporter: hongzune@gmail.com
    Classification: Unclassified

Created attachment 30241
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30241&action=edit
The attached excel file for these issue has a external links

Just as simple test, I used POI to read the xlsx file and then immediately
write it out without any modification.  
After writing with POI the xlsx file is unreadable by MS Excel 2010: 
Excel found unreadable content in 'xxx.xlsx'. Do you want to recover the
contents of this workbook?

This is most likely happening because that the external links in workbook
contain U+3000 "IDEOGRAPHIC SPACE" character (commonly called a 'full-width
space').

※ how to create external links in excel
 Define a name by using the New Name dialog box
 1.On the Formulas tab, in the Defined Names group, click Define Name.
 2.In the New Name dialog box, in the Name box, type the name.
 3.To specify the scope of the name, select Workbook.
 4.In the Refers to box, type the cell reference of External Excel file.
   ex)='D:\[1 test.xlsx]Sheet1'!$A$2

This is the code I used: 

/////////////////////////////////
import java.io.FileInputStream;
import java.io.FileOutputStream;

import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;

public class ExternalLinkTest {

    public static void main(String[] args) {

        Workbook workBook = null;
        try {
            workBook = WorkbookFactory
                .create(new FileInputStream("externalLink.xlsx"));

            FileOutputStream fileOut;
            fileOut = new FileOutputStream("output_externalLink.xlsx");
            workBook.write(fileOut);
            fileOut.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
/////////////////////////////////

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 54907] Unreadable content error when reading .xlsx with external links containing U+3000('IDEOGRAPHIC SPACE') character.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54907

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominik.stadler@gmx.at

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 54907] Unreadable content error when reading .xlsx with external links containing U+3000('IDEOGRAPHIC SPACE') character.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54907

Lee <ho...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|XSLF                        |XSSF
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 54907] Unreadable content error when reading .xlsx with external links containing U+3000('IDEOGRAPHIC SPACE') character.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54907

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
POI itself can read the file back in, however in the .xlsx file that is
generated by POI, the file under /xl/externalLinks/_rels/externalLink1.xml.rels
is missing completely in the resulting file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 54907] Unreadable content error when reading .xlsx with external links containing U+3000('IDEOGRAPHIC SPACE') character.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54907

--- Comment #1 from Lee <ho...@gmail.com> ---
Created attachment 30242
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30242&action=edit
The file which produces Unreadable content error

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org