Bug 164249 - XmlFilterBase::importFragment - XML parser failed in fragment, "invalid sheet index used
Summary: XmlFilterBase::importFragment - XML parser failed in fragment, "invalid sheet...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-09 09:46 UTC by Caolán McNamara
Modified: 2024-12-12 17:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2024-12-09 09:46:54 UTC
Description:
Some xlsx files when import and exported back to xlsx cannot be opened by LibreOffice

Steps to Reproduce:
1. wget https://bugs.documentfoundation.org/attachment.cgi?id=122409 -O ~/Downloads/tdf97598-1.xlsx
2. ./instdir/program/soffice --headless --convert-to xlsx ~/Downloads/tdf97598-1.xlsx
3. ./instdir/program/soffice --headless --convert-to pdf ./tdf97598-1.xlsx

Actual Results:
warn:sc:873055:873055:sc/source/filter/oox/formulabase.cxx:1383: OpCodeProviderImpl::initFuncOpCode - no opcode mapping for function ODF 'ORG.OPENOFFICE.EASTERSUNDAY' <-> OOXML '_xlfn.ORG.OPENOFFICE.EASTERSUNDAY'
warn:sc:873055:873055:sc/source/filter/oox/formulabase.cxx:1383: OpCodeProviderImpl::initFuncOpCode - no opcode mapping for function ODF 'ORG.OPENOFFICE.EASTERSUNDAY' <-> OOXML 'EASTERSUNDAY'
warn:legacy.osl:873055:873055:sc/source/filter/oox/formulabase.cxx:1244: OpCodeProviderImpl::OpCodeProviderImpl - opcodes not initialized
warn:oox:873055:873055:oox/source/core/xmlfilterbase.cxx:424: XmlFilterBase::importFragment - XML parser failed in fragment 'xl/workbook.xml' com.sun.star.uno.RuntimeException message: "invalid sheet index used at /home/caolan/LibreOffice/core/sc/source/filter/oox/workbookhelper.cxx:438"
Error: source file could not be loaded

Expected Results:
successful roundtrip


Reproducible: Always


User Profile Reset: No

Additional Info:
not known if this ever worked
Comment 1 Caolán McNamara 2024-12-10 08:37:08 UTC
I wonder if this has anything to do with bug #162177 given the mention of "no opcode mapping for function ODF 'ORG.OPENOFFICE.EASTERSUNDAY' <-> OOXML '_xlfn.ORG.OPENOFFICE.EASTERSUNDAY'"
Comment 2 Eike Rathke 2024-12-12 15:17:05 UTC
Sounds very likely.
If I find time over the weekend / next week I can take a look at this / that change.