Bug 155007 - FILESAVE XLS Excessive number of rows or columns warning when saving after selecting all
Summary: FILESAVE XLS Excessive number of rows or columns warning when saving after se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, filter:xls, implementationError
Depends on:
Blocks: XLS-Limitations
  Show dependency treegraph
 
Reported: 2023-04-25 10:43 UTC by ady
Modified: 2023-04-29 03:48 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 ady 2023-04-25 10:43:37 UTC
1. New Calc.
2. [CTRL]+[A]
3. [CTRL]+[SHIFT]+[S]
4. Use a new/different file name; select the type of file to be 97-2003 XLS; [OK]
5. In the first dialog, confirm the XLS file format (instead of the suggested ODS file format).

Actual result:
There is a warning, either about too many rows or about too many columns not supported by the (XLS) file format.
"
The document contains more rows than supported in the selected format.
Additional rows were not saved.
"

Expected result:
Avoid either of the 2 possible warnings (too many rows, too many columns) when it is about selection _only_ and there is no real dependency on columns/rows beyond the XLS limit (i.e. beyond cell IV65536, or R65536C256).
Comment 1 Heiko Tietze 2023-04-26 06:47:38 UTC
Yes, selection only gives the warning but should consider whether cells contain any data. Not sure if this topic is covered in the see also or other tickets.
Comment 2 ady 2023-04-26 07:07:01 UTC
(In reply to Heiko Tietze from comment #1)
> Yes, selection only gives the warning but should consider whether cells
> contain any data.

Not only data contained within a cell, but any kind of valid dependency (e.g. conditional format depending on some other cell, Validity, etc.). All that, except if the only thing is selection of the cell.

Selection by itself (without any "real" dependency) should not trigger a warning, because there is no real loss (of any kind of data) when saving.

Apparently, the selected area is being "saved", so when cells above the limit of XLS format are selected, the warnings are triggered (either rows or columns, depending on which area was selected).

> Not sure if this topic is covered in the see also or other
> tickets.

Other reports have contradicting comments and apparently some behavior has been tracked to older versions (which I doubt, but OK). This has a simple STR for both warnings. See bug 92164 comment 38 and up.
Comment 3 Buovjaga 2023-04-27 14:32:49 UTC
Bibisected the behaviour change with linux-43max to 28e9efe5b4d6699b33498953e798f76008edaeda

fdo#40694 - Error in message when truncating col/row numbers in calc

It looks like while older version (3.5.x) gives a wrong warning
The newer version doesn't give any warnings.
With this it gives the warning with correct message.
Comment 4 Buovjaga 2023-04-27 14:33:05 UTC
That's bug 40694
Comment 5 ady 2023-04-28 15:42:47 UTC
> fdo#40694 - Error in message when truncating col/row numbers in calc
> 
> It looks like while older version (3.5.x) gives a wrong warning
> The newer version doesn't give any warnings.
> With this it gives the warning with correct message.

In LO 4.2, there was no warning when some data would had been lost while saving as XLS (i.e. beyond cell IV65536).

In LO 4.3, the warning indeed exists.

The problem is that, even with no relevant/real dependency beyond cell IV65536, by just selecting (for instance) an entire row/column while saving as XLS, the warning is shown even if there is no real data loss. In such cases, the warning is misleading.

Is the "selected area(s)" even really "saved" somewhere in the XLS file?

If there is no real data loss, the warning should not be shown.
Comment 6 Buovjaga 2023-04-28 16:24:58 UTC
(In reply to ady from comment #5)
> > fdo#40694 - Error in message when truncating col/row numbers in calc
> > 
> > It looks like while older version (3.5.x) gives a wrong warning
> > The newer version doesn't give any warnings.
> > With this it gives the warning with correct message.
> 
> In LO 4.2, there was no warning when some data would had been lost while
> saving as XLS (i.e. beyond cell IV65536).
> 
> In LO 4.3, the warning indeed exists.
> 
> The problem is that, even with no relevant/real dependency beyond cell
> IV65536, by just selecting (for instance) an entire row/column while saving
> as XLS, the warning is shown even if there is no real data loss. In such
> cases, the warning is misleading.
> 
> Is the "selected area(s)" even really "saved" somewhere in the XLS file?
> 
> If there is no real data loss, the warning should not be shown.

Maybe I should have added that that was me quoting the commit message.
Comment 7 ady 2023-04-29 03:48:28 UTC
To sum up...

Each of the possible messages (depending on the specific "selected area") are:

"
The document contains more columns than supported in the selected format.
Additional columns were not saved.
"
"
The document contains more rows than supported in the selected format.
Additional rows were not saved.
"

The messages themselves are not the real problem.

The problem is that the "selected" area should not really be part of the active area – or however the actually-relevant area is supposed to be named – to be (checked for limits in XLS format and) saved.

I guess the problem is in:

sc/source/filter/excel/xehelper.cxx