Bug 162093 - Excel keywords [#Data], [#Totals] ... are wrongly imported
Summary: Excel keywords [#Data], [#Totals] ... are wrongly imported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.0.2 target:...
Keywords:
Depends on:
Blocks: Calc-DataRange
  Show dependency treegraph
 
Reported: 2024-07-18 18:27 UTC by Regina Henschel
Modified: 2024-08-30 13:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Source for import (12.06 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2024-07-18 18:27 UTC, Regina Henschel
Details
Allow to use single brackets around keyword (1.12 KB, patch)
2024-07-24 20:07 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2024-07-18 18:27:40 UTC
Created attachment 195380 [details]
Source for import

Open attached document. It has on the left side the import of Excel table "myData". It becomes a database range in LibreOffice. That is correct.

Column K contains the formulas as text as they are used in Excel.
Column I contains =FORMULA(col F) and shows, what LibreOffice has produced in import.

Columns F:H should show the same data as columns B:D. You will see error #NAME?. 
(If you see a different error, that is likely bug 162087. In that case look at Tools > Options > Calc > Formula whether the option "Use English function names" is really off and reload the document.)

The column I has for example {=myData[#headers]}. The lowercase 'headers' show, that the keyword is not detected.

Reason for the error is, that the import generates a wrong expression. For LibreOffice it has to be {=myData[[#Headers]]}. Notice the double brackets.

You can use column L to test this: Enter =myData[[#Headers]] in cell L4 and finish with Ctrl+Shift+Enter to generate a matrix formula.
Comment 1 m_a_riosv 2024-07-18 22:19:12 UTC
Reproducible
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d5d4e1334957abc29c5c4f543a8cd15a5aaf8748
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Regina Henschel 2024-07-24 20:07:48 UTC
Created attachment 195479 [details]
Allow to use single brackets around keyword

Hi Eike, next approach. Is that place correct? If not, can you provide me code pointers? If the place is correct, do you see problems, that I need to address in addition? Your advise is welcome.
Comment 3 Eike Rathke 2024-07-25 00:04:35 UTC
Oh great, I accidentally committed almost the same (with wrong number of bug 162087), but only the second part.. worked though.


committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f1f5e9c8d7be16a969e58ebf7cfae99eef5bcb6e

Resolves: tdf#162087 TableRef item specifier may occur standalone

It will be available in 25.2.0.

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

Affected users are encouraged to test the fix and report feedback.


I'll check and may complete it with the other half with you as author.
Comment 4 Eike Rathke 2024-07-25 00:30:09 UTC
Yeah right, the pre-skipping of everything up to the next ']' is executed then.
Comment 5 Commit Notification 2024-07-25 10:57:49 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4aa2d5ede17ddf7345804deb200983367990a7e2

Related: tdf#162093 TableRef item specifier may occur standalone

It will be available in 25.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-07-25 12:10:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/25a42da1f94cfd0555fc83126888eb605a9014f2

Resolves: tdf#162093 TableRef item specifier may occur standalone

It will be available in 24.8.0.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 Eike Rathke 2024-07-25 15:44:42 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/171026 for 24-2
Comment 8 Regina Henschel 2024-07-25 16:21:10 UTC
(In reply to Eike Rathke from comment #3)
> I'll check and may complete it with the other half with you as author.

I feel flattered :)
Comment 9 Commit Notification 2024-07-25 16:58:53 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/aa5a10016b1d78c4913775ac8990cebe48f1e38e

tdf#162093: sc_subsequent_filters_test4: Add unittest

It will be available in 25.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Regina Henschel 2024-07-26 14:18:34 UTC
Verified in Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dc9486f2443fa52588b625c0a2a288bff56a7a45
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 11 Commit Notification 2024-08-27 10:12:21 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/6cdc3e24b5089e94de04d753c5a9b00856ef04cb

Resolves: tdf#162093 TableRef item specifier may occur standalone

It will be available in 24.2.7.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2024-08-30 13:43:59 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-24-2-6":

https://git.libreoffice.org/core/commit/b586e7285653e9de917716045de4f0935f9b0953

Resolves: tdf#162093 TableRef item specifier may occur standalone

It will be available in 24.2.6.

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

Affected users are encouraged to test the fix and report feedback.