Description: If a formula gives #N/A result – because of missing data – and this result is copied and pasted using Paste Special, then saved as XLSX the reloaded file gives Err:520, while Excel gives #N/A. Steps to Reproduce: 1. Open attached file. It contains a simple MATCH formula in B2:B3 that refers to the second sheet. The function in B3 gives #N/A since it does not find a match on the second sheet. 2. The contents of B2:B3 were copied and pasted as text in Excel to B5:B6. The result in B6 is imported fine as in Calc. User intent was to get the formula results as plain text. 3. Copy the B2:B3 cells contents (in the example B8:B9) and insert it using Paste Special, with default settings (Selection: Text, Numbers, Date&Time). 4. Save the file as XLSX and reload. Actual Results: In Calc the B9 cells content appears as Err:520, while in Excel it appears as #N/A Expected Results: B9 cell should show #N/A too Reproducible: Always User Profile Reset: No Additional Info: Version: 7.0.0.0.alpha0+ (x64) Build ID: cf96cb11e2a46c452a273ded1c66c556118983cf CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; Locale: hu-HU (hu_HU); UI-Language: en-US Calc: CL Started to happen in: Version: 4.4.0.3 Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7 Locale: hu_HU
Created attachment 158715 [details] Example file from Excel
Created attachment 158716 [details] The original file after using Paste Special and saved by Calc
Created attachment 158717 [details] Screenshot of the exported document side by side in Excel and Calc
Bibisected using bibisect-win32-5.0 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=a1dc5e97da273bf35d58d54e625149022569a993 author Eike Rathke <erack@redhat.com> 2014-12-16 01:56:58 +0100 committer Eike Rathke <erack@redhat.com> 2014-12-16 02:02:14 +0100 summary: construct grouped ScFormulaCell with bDirty=true, fdo#79249 related Although this probably just made the problem visible: Before this the B2 cell appeared empty in the grid, yet contained a formula in the edit bar. In 4.1 the B2 cell was not empty this way, copying #N/A seemed to work like today, but saving to XLSX and reopening results in a simple = sign instead of the Err:520. Not adding regression tag.
Works for me with Version: 7.0.0.0.alpha0+ (x64) Build ID: 6f82f5163fdd43ea22958dfb28926c88ed97fa7c CPU threads: 4; OS: Windows 10.0 Build 19582; UI render: Skia/Raster; VCL: win; Locale: es-ES (es_ES); UI-Language: en-US Calc: threaded
I can reproduce. * load the first attached document * copy formula cell B3 with #N/A error * paste special (without formulas) somewhere => #N/A special formula cell is created * save as .xlsx * reload => the pasted cell has an Err:520 instead
In fact happens with any error result, =NA() #N/A or =1/0 #DIV/0! both become Err:520.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/456f093975ce4e4266eb12b62590eaaba6f2de88 Resolves: tdf#131372 Write "error cell" formula to OOXML It will be available in 7.0.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.
Pending review https://gerrit.libreoffice.org/c/core/+/91390 for 6-4 https://gerrit.libreoffice.org/c/core/+/91393 for 6-3
Verified in Version: 7.0.0.0.alpha0+ Build ID: 169a10f0e4680814145b668c6320be04038d7a89 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded @Eike, thanks for fixing this issue!!
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/02c0824899b2459bba98d4cfef933bfe7376f41f Resolves: tdf#131372 Write "error cell" formula to OOXML It will be available in 6.4.4. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/437d30fa8e7daaf12990cf9672614e630e915ba5 tdf#131372: Add unittest It will be available in 7.0.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/bcbf27beddabf6e76331e93fd7bead9ec534605e Resolves: tdf#131372 Write "error cell" formula to OOXML It will be available in 6.3.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.