Removing a row in tiny XLSX creates row 1048576

Weird behaviour of LibreOffice Calc when working with a tiny simple .xlsx file originating from MS Excel:

  1. Create a tiny .xlsx file in MS Excel. In row 1, enter e. g. “Hello” in A1, “world” in B2. In row 2, enter e. g. “Mum” in A2, “loves” in B2, “ice” in C2, “cream” in D2.
  2. Save as e. g. tiny.xlsx
  3. Open tiny.xlsx in LibreOffice Calc
  4. context menu on row 1 (right mouse click row 1) → click “Delete rows”.
  5. Save as xlsx.

The problem: the original tiny.xlsx had only 2 rows. row 1 and row 2. After removing row 1 in LibreOffice Calc, the resulting file will have… 2 rows: row 1 and row 1048576 :open_mouth:
This is not visible in the UI. However, if you look at the underlying XMLs, you’ll see the following:
(the original tiny.xlsx):

  ...
  <dimension ref="A1:D2"/>
  ...
  <sheetData>
    <row r="1" spans="1:4" x14ac:dyDescent="0.25">
    ...
    </row>
    <row r="2" spans="1:4" x14ac:dyDescent="0.25">
     ...
    </row>
  </sheetData>
   ...

(the final tiny.xlsx):

  <dimension ref="A1:D1048576"/>
  ...
  <sheetData>
    <row r="1" customFormat="false" ht="15" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
       ...
    </row>
    <row r="1048576" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false"/>
  </sheetData>
  ...

Is this known behaviour or a bug?
Program versions used:

  • current MS Excel 365
    Microsoft® Excel® for Microsoft 365 MSO (Version 2510 Build 16.0.19328.20266) 64-bit
    
  • fairly recent LibreOffice Calc:
    Version: 25.8.3.2 (X86_64)
    Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
    CPU threads: 20; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
    Locale: en-US (en_US); UI: en-US
    Calc: threaded
    

Thanks for the interesting example!
I’m getting the same results. I think this is a bug that needs to be reported to Bugzilla. Please post a link to the bug report you filed in this forum topic.

1 Like

I thought this was known behaviour , but as no one confirms, I reported it as a bug here:
https://bugs.documentfoundation.org/show_bug.cgi?id=170246

2 Likes