Created attachment 172963 [details] First LEFT may refers to a blank cell If LEFT() formula inserts spaces at the beginning of the string (because the cell it refers to is blank) and is saved as .xlsx, when you reopne the file, the string ignores spaces until it is recalculated. By copying and pasting before the recalculation the leading spaces are missing. Saving in .ods the formula works correctly and the copy and paste works as expected.
Hello PremPa, thanks for reporting this issue. Could you please explain the steps to reproduce the issue using the attached file ?
(In reply to Xisco Faulí from comment #1) > Hello PremPa, > thanks for reporting this issue. > Could you please explain the steps to reproduce the issue using the attached > file ? Sure. If I open the attached file I see the cell R2 with no blank spaces at the beginnig. Now if I press F9 the cell is recalculated and the first 5 spaces related to the formula LEFT(M3&" ";5) appears If I save in ods everything works correctly. If you want to try in a new fil just type in A1 =LEFT(A2&" ";5)&LEFT(B2&" ";5)&LEFT(C2&" ";5) leave A2 empty, type something in B2 and in C2, save in xlsx and reopen: the first five spaces doesen't are there Press F9 and they will appear.
Repro Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 6805efdecb240fad8c82a5c1756a2a0e92f12b7d CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: threaded
Czeber László Ádám committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7ec4c6df68233b73b1e257e013583ca49fc2ec9b tdf#142905 XLSX import: don't trim leading spaces in formula cell It will be available in 24.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.
Czeber László Ádám committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/15e8278144a7326e9587a665e9e1068562309295 tdf#142905 XLSX import: don't trim leading spaces in formula cell It will be available in 7.6.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.
*** Bug 158175 has been marked as a duplicate of this bug. ***