Bug 170246 - Removing rows in XLSX creates row 1048576
Summary: Removing rows in XLSX creates row 1048576
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-06 15:04 UTC by Anton Shcherbinin
Modified: 2026-01-06 16:09 UTC (History)
1 user (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 Anton Shcherbinin 2026-01-06 15:04:10 UTC
Description:
If a user opens an .xlsx spreadsheet originating from MS Excel which has only a few rows and removes some of them, then saves the result as .xlsx,
 <row r="1048576" ...>
will be created in xl/worksheets/sheet1.xml and the updated <dimension> tag will reflect this, e. g.: <dimension ref="A1:D1048576"/>

The unexpectedly created <row r="1048576" ...> will be empty and invisible in the UI. However, this drives crazy simple programs, processing the spreadsheet row by row and column by column. They try to process 1048576 rows from 1 to 1048576 which takes eternity.

Steps to Reproduce:
1. Create a new spreadsheet in MS Excel 365.
2. In row 1, enter "Hello" in cell A1, "world" in cell B2. In row 2, enter "Mum" in A2, "loves" in B2, "ice" in C2, "cream" in D2. Exact strings do not matter.
3. Save as excel.xlsx (default MS Excel XLSX format)
3. Open excel.xlsx in LibreOffice Calc
4. context menu on row 1 (right mouse click row 1) -> click "Delete rows".
5. Save as localc.xlsx 
6. Look at xl/worksheets/sheet1.xml inside localc.xlsx

Actual Results:
  <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>
  ...

Expected Results:
  <dimension ref="A1:D1"/>
  ...
  <sheetData>
    <row r="1" customFormat="false" ht="15" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
       ...
    </row>
  </sheetData>
  ...



Reproducible: Always


User Profile Reset: No

Additional Info:
LibreOffice Calc version:
   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

MS Excel version:
Microsoft® Excel® for Microsoft 365 MSO (Version 2510 Build 16.0.19328.20266) 64-bit

To quickly look at the XML inside the localc.xlsx, I used the following console command under Linux:
unzip -p localc.xlsx xl/worksheets/sheet1.xml | xmllint --pretty 1 /dev/stdin
Comment 1 Vladimir Sokolinskiy 2026-01-06 16:09:33 UTC
Repro.

Microsoft Office 2016.

Version: 25.8.3.2 (X86_64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 6; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded