Bug 155405 - FILEOPEN XLSX CELL() function gives Err:504 with the prefix, protect and width infotype parameters
Summary: FILEOPEN XLSX CELL() function gives Err:504 with the prefix, protect and widt...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://help.libreoffice.org/7.5/en-U...
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX
  Show dependency treegraph
 
Reported: 2023-05-19 10:59 UTC by Gabor Kelemen (allotropia)
Modified: 2023-08-10 10:16 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 Gabor Kelemen (allotropia) 2023-05-19 10:59:27 UTC
Continuing bug 155402

1 Open attachment 187392 [details]
2 Observe the values in the A8, A9, A12 cells is Err:504 as seen on attachment 187393 [details] 
Here the CELL() function is used with the prefix, protect and width values of the infotype parameter.
These are supported with mostly the same meaning as in Excel, just the XLSX import (and probably the export) is incorrect.

See: https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf 

prefix: from LO help:
Returns the alignment of the referenced cell.
' = align left or left-justified
" = align right
^ = centered
\ = repeating (currently inactive)
This is the same as in Excel for the first three, but \ has different meaning there:
"backslash (\) if the cell contains fill-aligned text, and empty text ("") if the cell contains anything else."

protect: from LO help:
Returns the status of the cell protection for the cell.
1 = cell is protected
0 = cell is not protected
- this is the same as in Excel

width: from LO help:
Returns the width of the referenced column. The unit is the number of zeros (0) that fit into the column in the default text and the default size.

this is only "somewhat" similar in Excel: 

Returns an array with 2 items.

The 1st item in the array is the column width of the cell, rounded off to an integer. Each unit of column width is equal to the width of one character in the default font size.

The 2nd item in the array is a Boolean value, the value is TRUE if the column width is the default or FALSE if the width has been explicitly set by the user. 

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: b3c88dc039d447322b8c8c564ab6e2f0ce9c5b90
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded
Comment 1 Buovjaga 2023-08-10 10:16:20 UTC
Confirmed

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2d0268f5ae6061bc96c00481c9ef3547be300b5a
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 10 August 2023