Bug 142297 - gnumeric file is not opened correctly
Summary: gnumeric file is not opened correctly
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Format-Filters
  Show dependency treegraph
 
Reported: 2021-05-15 14:05 UTC by Valek Filippov
Modified: 2023-08-05 09:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Gnumeric sample (2.74 KB, application/gzip)
2021-05-15 14:05 UTC, Valek Filippov
Details
Screenshot in gnumeric (131.76 KB, image/png)
2021-05-15 14:06 UTC, Valek Filippov
Details
Screenshot in LO (51.58 KB, image/png)
2021-05-15 14:08 UTC, Valek Filippov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-05-15 14:05:13 UTC
Description:
LO Calc fails to properly import Gnumeric file.

Steps to Reproduce:
Open attached gnumeric sample

Actual Results:
Text is not wrapped for cell C1.
#NAME? error in cell C4.
Wrong values in cells C5:C10.
Unexpected values in cells C11: ...


Expected Results:
File rendered as in gnumeric.


Reproducible: Always


User Profile Reset: No



Additional Info:
LO Calc crashed when I tried to changed C6.
Comment 1 Valek Filippov 2021-05-15 14:05:38 UTC
Created attachment 172023 [details]
Gnumeric sample
Comment 2 Valek Filippov 2021-05-15 14:06:06 UTC
Created attachment 172024 [details]
Screenshot in gnumeric
Comment 4 Valek Filippov 2021-05-15 14:08:57 UTC
Created attachment 172025 [details]
Screenshot in LO
Comment 5 Roman Kuznetsov 2021-05-15 15:56:57 UTC
(In reply to Valek Filippov from comment #0)
> Description:
> LO Calc fails to properly import Gnumeric file.
> 
> Steps to Reproduce:
> Open attached gnumeric sample
> 
> Actual Results:
> Text is not wrapped for cell C1.

yes

> #NAME? error in cell C4.

yes

> Wrong values in cells C5:C10.

no

> Unexpected values in cells C11: ...

no

>LO Calc crashed when I tried to changed C6.

NO

So partially confirmed in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dbd4110cc36011042c98549d997daa79e8065aba
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL
Comment 6 Valek Filippov 2021-05-15 22:54:25 UTC
Sorry, I messed up with description. Wrong values are in D5:D10 and extra values are in D11:D16.
Comment 7 m_a_riosv 2021-05-16 00:23:48 UTC
Seems the file doesn't pass odf validator https://odfvalidator.org/
Comment 8 Valek Filippov 2021-05-16 00:31:29 UTC
(In reply to m.a.riosv from comment #7)
> Seems the file doesn't pass odf validator https://odfvalidator.org/

Why would gnumeric file pass ODF validator?
Comment 9 m_a_riosv 2021-05-17 14:41:25 UTC
You are right it should be like a xlsx file, with gzip compression.


It has formulas like:
 <gnm:Cell Row="5" Col="3" Rows="1" Cols="1">=min(sum(if(isnumber('bug?'!$A$2:$A$27),1,0)*iferror(if('bug?'!$A$2:$A$27&lt;D5,1,0),0)),sum(if(isnumber('bug?'!$A$2:$A$27),1,0)*iferror(if('bug?'!$A$2:$A$27&gt;D5,1,0),0)))</gnm:Cell>

It makes reference to a 'bug?' sheet, but that sheet name it's not allowed in LibreOffice, '?' it's a non permitted character.
Comment 10 QA Administrators 2023-05-30 03:15:56 UTC Comment hidden (obsolete)
Comment 11 Roman Kuznetsov 2023-05-30 08:27:45 UTC
Still repro

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 4b3d3354119b643ec20aaad187d0a6506ea307fb
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 12 Kohei Yoshida 2023-07-28 02:04:33 UTC
This document contains a sheet name 'bug?' where the use of '?' is not allowed in Calc (and also in Excel for that matter).  It's an invalid sheet name.  Because of that, Calc cannot interpret the formula expression which also contains the sheet name 'bug?'.  Unfortunately this issue is very hard to address on Calc side.  The best we could do is to find some way to notify the user of the presence of invalid sheet name in the original document, and stops loading it.

FYI, these are the characters that are not allowed in sheet names:

  :\/?*[]'
Comment 13 mwelinder 2023-08-05 01:13:06 UTC
> It's an invalid sheet name.

Why do you say that?

ods seems to specify that table:name is a string.  There is no restriction with respect to characters.  So if loffice wants to be compatible with ods it needs to support names like "Bug?"

http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#a_19_675_table_name

Or am I missing something?
Comment 14 m_a_riosv 2023-08-05 09:27:10 UTC
In https://help.libreoffice.org/latest/en-US/text/scalc/guide/rename_table.html?DbPAR=CALC#bm_id3150398
So it is not a bug, it is by design.

BTW, I don't think the table name, it's the same as the sheet name.

And not everything in OpenDocument it's mandatory.

And even the restrictions are not declared in OpenDocument, I think they exist for interoperability matter, specially with Excel. An important reason we like it or not.