Bug 139706 - Saving as XLS should say how many rows dropped
Summary: Saving as XLS should say how many rows dropped
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls
Depends on:
Blocks: XLS-Limitations
  Show dependency treegraph
 
Reported: 2021-01-17 15:56 UTC by Jonny Grant
Modified: 2023-04-08 06:27 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 Jonny Grant 2021-01-17 15:56:20 UTC
I Load a TSV file, which Calc can't load more than 1M rows
Then I save as XLS, and there is a popup error saying the format can't handle the number of rows, and is truncated.

Can the error popup specify how many rows were output, and how many were dropped?
Could even suggest to save as ODS.
Comment 1 [REDACTED] 2021-01-17 16:06:31 UTC
If I understand the description correctly the calculation is simple:

Loading TSV file gets cut to 1048576 rows on import. Hence you have 1048576 row in the document while application is running. Now you save to XLS (not XLSX!), which has a row limit of 2^16=65536 rows. Hence 1048576 - 65536 = 983040 rows have been skipped.
Comment 2 Jonny Grant 2021-01-17 16:12:58 UTC
(In reply to Uwe Auer from comment #1)
> If I understand the description correctly the calculation is simple:
> 
> Loading TSV file gets cut to 1048576 rows on import. Hence you have 1048576
> row in the document while application is running. Now you save to XLS (not
> XLSX!), which has a row limit of 2^16=65536 rows. Hence 1048576 - 65536 =
> 983040 rows have been skipped.

Yes, that's what I calculated myself.

Can the error be clearly displayed with the information?

"XLS File format does not support saving all 1,048,576 rows, therefore only 65,536 rows have been saved. 983,040 have been skipped. Please consider choosing ODS format to preserve all rows.
Comment 3 Jean-Baptiste Faure 2021-08-12 15:31:40 UTC
(In reply to Jonny Grant from comment #2)
> (In reply to Uwe Auer from comment #1)
> > If I understand the description correctly the calculation is simple:
> > 
> > Loading TSV file gets cut to 1048576 rows on import. Hence you have 1048576
> > row in the document while application is running. Now you save to XLS (not
> > XLSX!), which has a row limit of 2^16=65536 rows. Hence 1048576 - 65536 =
> > 983040 rows have been skipped.
> 
> Yes, that's what I calculated myself.
> 
> Can the error be clearly displayed with the information?
> 
> "XLS File format does not support saving all 1,048,576 rows, therefore only
> 65,536 rows have been saved. 983,040 have been skipped. Please consider
> choosing ODS format to preserve all rows.

Good point.

Set status to NEW and importance to enhancement.

Best regards. JBF
Comment 4 Jonny Grant 2021-08-16 21:36:14 UTC
Hi

Even better is a dialog offering:

"XLS File format does not support saving all 1,048,576 rows click [OK] to save a truncated 65,536 rows, or [Cancel] to change to another format"
Comment 5 Jonny Grant 2021-08-16 21:36:59 UTC
Note, if this bug can be implemented, it would be worth adding the same for TSV or CSV loading, if those are truncated too.