Bug 114555 - Calc does not give warning when opening file containing a sheet with more than 1024 columns
Summary: Calc does not give warning when opening file containing a sheet with more tha...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.3
Keywords: dataLoss
Depends on:
Blocks: File-Opening
  Show dependency treegraph
 
Reported: 2017-12-19 11:28 UTC by Kevin Paxman
Modified: 2018-05-18 12:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
warning for csv file (9.69 KB, image/png)
2017-12-28 22:44 UTC, raal
Details
A .xlsx saved by Excel. It has the value 'Hi' in column XFD, giving it 16,384 columns. (7.82 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-01-02 15:06 UTC, Kevin Paxman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Paxman 2017-12-19 11:28:28 UTC
Description:
Calc cannot handle sheets with more than 1024 columns. Some files opened by calc will contain sheets with more than this (for example spreadsheets created with Excel can have up to ~16,000 columns).

The current behaviour is to silently truncate the sheets at the 1024 column mark (AMJ). This can lead to the user being unaware that the spreadsheet is incomplete. If the user saves the file, these columns will be permanently lost.

I propose that a clear warning is given when a user opens a file with over 1024 columns informing them that not all columns are being displayed and that saving the file will lead to loss of data.

Steps to Reproduce:
1. Open a file saved by Excel with a sheet with more than 1024 columns
2. Save the file


Actual Results:  
The large sheet is truncated after column 1024 (AMJ).
No warning of this is given.
The saved file is smaller and no longer contains these columns.

Expected Results:
A warning informs the user that truncation has occured.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Buovjaga 2017-12-25 19:34:51 UTC
For what it's worth, there is ongoing work to get rid of this limitation: bug 50916
Comment 2 raal 2017-12-28 22:44:31 UTC
Created attachment 138723 [details]
warning for csv file

Hi, for csv file it works. Please,could you attach testing xlsx file with more then 1024 columns?
Comment 3 Kevin Paxman 2018-01-02 15:06:43 UTC
Created attachment 138808 [details]
A .xlsx saved by Excel. It has the value 'Hi' in column XFD, giving it 16,384 columns.
Comment 4 Kevin Paxman 2018-01-02 15:08:58 UTC
(In reply to Buovjaga from comment #1)
> For what it's worth, there is ongoing work to get rid of this limitation:
> bug 50916

Understood, and I look forward to the 6.x series where this no longer an issue. However if people are going to be presumably using 5.x for a while longer, this is an issue that should be patched IMO.
Comment 5 raal 2018-01-02 15:21:58 UTC
Confirming. Eike, it's similar to bug 43911. Could you add such warning for xlsx too?
Comment 6 Eike Rathke 2018-02-28 21:09:40 UTC
After having dug around a lot.. seems so.
Comment 7 Commit Notification 2018-02-28 21:44:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f2a4cea6c035e9a837942934068b5f80a996580a

Resolves: tdf#114555 check .xlsx col/row/tab overflow and display warning

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2018-02-28 22:04:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ed7cd31848201e8bc6d4ec69e397ff2e6e154b50

Revert "Resolves: tdf#114555 check .xlsx col/row/tab overflow and display warning"

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-03-01 12:17:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=66564dac88ffcc781b4fade7ca0f4f72af6b8bca

Resolves: tdf#114555 check .xlsx col/row/tab overflow and display warning

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Eike Rathke 2018-03-01 13:19:37 UTC
Pending review https://gerrit.libreoffice.org/50570 for 6-0
Comment 11 Commit Notification 2018-03-02 15:29:19 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ccc977ba10b61108a56e00a79c0f7a1517e026cc

Related: tdf#114555 cater for lastcolumn+1 oddity if last is last possible

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Elmar 2018-03-13 08:19:22 UTC
Tried with
Version: 6.1.0.0.alpha0+
Build ID: 4647057a077824cd6782be82b2d13e06fa76704b
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-03-13_00:16:40
Locale: en-ZA (en_ZA.UTF-8); Calc: group

Unfortunately get the same error.
Comment 13 Buovjaga 2018-03-13 08:59:07 UTC
(In reply to Elmar from comment #12)
> Tried with
> Version: 6.1.0.0.alpha0+
> Build ID: 4647057a077824cd6782be82b2d13e06fa76704b
> CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
> TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
> 2018-03-13_00:16:40
> Locale: en-ZA (en_ZA.UTF-8); Calc: group
> 
> Unfortunately get the same error.

I'm sorry, but
1. What did you try?
2. What is the "error"?
Comment 14 Buovjaga 2018-03-13 08:59:38 UTC
(In reply to Buovjaga from comment #13)
> I'm sorry, but
> 1. What did you try?
> 2. What is the "error"?

Elmar: see above.
Comment 15 Commit Notification 2018-03-15 23:42:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=621634923ab7c11ceef9757c481f92977ef863f6&h=libreoffice-6-0

Resolves: tdf#114555 check .xlsx col/row/tab overflow and display warning

It will be available in 6.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Kevin Paxman 2018-03-16 07:09:01 UTC
Thank you Eike.

Any chance of this being applied to the 5.X series also?
Comment 17 Eike Rathke 2018-03-19 11:40:24 UTC
Rather not. This change is somewhat intrusive and 5.4.7 will be the last release for 5-4 so if anything went wrong there would be no chance to correct it.
Comment 18 Commit Notification 2018-03-28 21:53:12 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=828e41a91742a55f213c1c9cd93efa4cf73bdf3c&h=libreoffice-6-0-3

Resolves: tdf#114555 check .xlsx col/row/tab overflow and display warning

It will be available in 6.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Kevin Paxman 2018-05-18 11:25:25 UTC
Can confirm it worked perfectly using 6.0.4.2 with a file I found in the wild.

Thank you.