You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/12/03 21:06:11 UTC

[Issue 126720] New: no text imported from xlsx

https://bz.apache.org/ooo/show_bug.cgi?id=126720

          Issue ID: 126720
        Issue Type: DEFECT
           Summary: no text imported from xlsx
           Product: Calc
           Version: 4.1.2
          Hardware: PC
                OS: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: open-import
          Assignee: issues@openoffice.apache.org
          Reporter: tananser@mail.ru

Created attachment 85192
  --> https://bz.apache.org/ooo/attachment.cgi?id=85192&action=edit
two files with different results of import

I have a lot of files created in MS Excel 2007 and saved as .xlsx. When I open
them with OpenOffice 4.1.2 Calc there is no text in cells, but numbers and
digits are there. I opened such file with MS Excel and saved it as .xls and it
was opened correctly with Calc. Both of xlsx and xls will be attached

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0

--- Comment #5 from damjan@apache.org ---
OStorage::openStreamElement() is in main/package, which isn't just used by
OOXML but also by ODF (a breakpoint there gets hit many times while loading an
ODF too), so I don't like making changes there for an OOXML-specific bug.

oox::ZipStorage::implOpenInputStream() seems like a better place.

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from damjan@apache.org ---
I've now patched oox::ZipStorage::implOpenInputStream() to do case insensitive
filenames matching when case sensitive fails, and it gets this file to open
successfully and all the text shows.

Fixed by commit 0f42b9a04e21324973f03349bb2929327cf84a20.

Resolving FIXED :).

Thank you for your bug report and sample file!

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

[Issue 126720] no text imported from XSLX (xl/SharedStrings.xml instead of xl/sharedStrings.xml)

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

Matthias Seidel <ms...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.0                       |4.1.14

--- Comment #8 from Matthias Seidel <ms...@apache.org> ---
Cherry-picked for AOO41X with:
https://github.com/apache/openoffice/commit/25c6f4b735608c9ccf2d582718536ff7c9470ddd

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

[Issue 126720] no text imported from XSLX (xl/SharedStrings.xml instead of xl/sharedStrings.xml)

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|no text imported from xlsx  |no text imported from XSLX
                   |                            |(xl/SharedStrings.xml
                   |                            |instead of
                   |                            |xl/sharedStrings.xml)

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

Keith N. McKenna <kn...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |knmc@apache.org
             Status|UNCONFIRMED                 |CONFIRMED
     Ever confirmed|0                           |1
           Priority|P5 (lowest)                 |P3

--- Comment #1 from Keith N. McKenna <kn...@apache.org> ---
I have confirmed that the xlsx file does not import the text values with AOO
4.1.2. Also the xls file open correctly in AOO 4.1.2. The xlsx file opens in
the Excel Viewer with all the text entries shown.

System Configuration:
Processor: Intel Core i5 CPU M560 @2.67GHz
Installed Memory: 2.00 GB (1.6 usable)
Operating System: Windows 7 Home Premium 64 bit

Apache Open Office:
AOO412m3(Build:9782)  -  Rev. 1709696
2015-10-21 09:53:29 (Mi, 21 Okt 2015)
Language: en_US
Additional Language Packs: None

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

Keith N. McKenna <kn...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|---                         |4.1.5
    Confirmation in|                            |

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

--- Comment #7 from Matthias Seidel <ms...@apache.org> ---
Cherry-picked for AOO42X with:
https://github.com/apache/openoffice/commit/bd3f92fa7151c22b06c065512cbefd13960d9f7c

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
                 OS|Windows 7                   |All
                 CC|                            |damjan@apache.org
             Latest|4.1.5                       |4.2.0-dev
    Confirmation in|                            |
           Keywords|                            |ms_interoperability

--- Comment #2 from damjan@apache.org ---
Same issue as 127086, one of the files is named:
xl/SharedStrings.xml
instead of:
xl/sharedStrings.xml

If you rename it to a zip file, unzip it, change the filename, zip it back up,
rename back to xslx, it opens perfectly, with all the text visible.

We should treat OOXML filenames case-insensitively, like Excel and LibreOffice
do.

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

Matthias Seidel <ms...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mseidel@apache.org

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexlsh@mail.ru

--- Comment #3 from damjan@apache.org ---
*** Issue 127086 has been marked as a duplicate of this issue. ***

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

[Issue 126720] no text imported from xlsx

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126720

--- Comment #4 from damjan@apache.org ---
Where in the code does this problem occur, and how can we fix it?

main/oox/source/xls/workbookfragment.cxx does this:

---snip---
    // read the shared string table substream (requires finalized styles
buffer)
    OUString aSstFragmentPath = getFragmentPathFromFirstType(
CREATE_OFFICEDOC_RELATION_TYPE( "sharedStrings" ) );
    if( aSstFragmentPath.getLength() > 0 )
        importOoxFragment( new SharedStringsFragment( *this, aSstFragmentPath )
);
---snip---

Debugging that code:

Thread 1 hit Breakpoint 1, oox::xls::WorkbookFragment::finalizeImport
(this=0x80dc9ed00) at source/xls/workbookfragment.cxx:208
208         if( aSstFragmentPath.getLength() > 0 )
(gdb) print dbg_dump(aSstFragmentPath)
$1 = (const sal_Char *) 0x80a0ef168 "xl/sharedStrings.xml"


Eventually we get as far as this, trying to open that xl/sharedStrings.xml:


#0  OStorage::OpenStreamElement_Impl(rtl::OUString const&, int, unsigned char)
(this=this@entry=0x80dca4bc0, aStreamName=..., nOpenMode=nOpenMode@entry=1,
bEncr=bEncr@entry=0 '\000') at source/xstor/xstorage.cxx:2204
#1  0x000000080e0761d5 in OStorage::openStreamElement(rtl::OUString const&,
int) (this=0x80dca4bc0, aStreamName=..., nOpenMode=1) at
source/xstor/xstorage.cxx:2507
#2  0x000000080e076ab2 in non-virtual thunk to
OStorage::openStreamElement(rtl::OUString const&, int) ()
    at
instsetoo_native/unxfbsdx/Apache_OpenOffice/installed/install/en-US/openoffice4/program/../program/libxstor.so
#3  0x000000080e60c795 in oox::ZipStorage::implOpenInputStream(rtl::OUString
const&) (this=<optimized out>, rElementName=...) at
source/helper/zipstorage.cxx:171
#4  0x000000080e609cb9 in oox::StorageBase::openInputStream(rtl::OUString
const&) (this=0x80dc4b030, rStreamName=...) at
source/helper/storagebase.cxx:164
#5  0x000000080e609c70 in oox::StorageBase::openInputStream(rtl::OUString
const&) (this=0x80db770f0, rStreamName=...) at
source/helper/storagebase.cxx:160
#6  0x000000080e4f9889 in oox::core::FilterBase::openInputStream(rtl::OUString
const&) const (this=<optimized out>, rStreamName=...) at
source/core/filterbase.cxx:370
#7  0x000000080e50340f in oox::core::FragmentHandler::openFragmentStream()
const (this=0x80dc73c00) at source/core/fragmenthandler.cxx:123
#8  0x000000080e5096c2 in
oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler>
const&) (this=0x80daff000, rxHandler=...) at source/core/xmlfilterbase.cxx:208
#9  0x000000080e70ecf3 in oox::xls::WorkbookFragment::finalizeImport()
(this=0x80dca4b20) at source/xls/workbookfragment.cxx:209


Then an exception is thrown, because it's not found.

Now where best to scan the zip file for names with different casing?

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