Bug 91759 - Excel removes spaces in links from relative paths in file saved by LibreOffice
Summary: Excel removes spaces in links from relative paths in file saved by LibreOffice
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.0.0.0.beta1
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: TooBusyNowNeedsFurtherTestingForPossi...
Keywords:
Depends on:
Blocks: XLSX-Hyperlink
  Show dependency treegraph
 
Reported: 2015-05-30 21:51 UTC by Matthias Braun
Modified: 2019-03-19 10:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
XLSX that links to a file with spaces (4.91 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-05-31 21:09 UTC, Matthias Braun
Details
The example file saved by current Calc master (5.23 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-03-19 10:25 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Braun 2015-05-30 21:51:01 UTC
Issue:
Excel will remove a link to a file containing spaces from an xlsx file.

Platforms:
Linux Mint Debian Edition
Windows 7 32 bit

Affected version:
LibreOfficeDev 5.0.0.0.beta1 
LibreOfficeDev Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3

Steps to reproduce
1. Create a Calc Spreadsheet on a USB drive (FAT 32)
2. Insert a hyperlink by first opening the relevant menu (Ctrl-K) and go to "Document"
3. In "Path" select a file with spaces in its name on your USB drive 
4. Save the file to "test.xlsx" (it has to be "Save" not "Save as" because the latter doesn't seem to convert absolute paths to relative ones)
5. Open test.xlsx using Excel 14.0.7149.5000 on Windows 7

Excel complains that the contents of the sheet are unreadable and offers to repair the document. After approving that, Excel reports that the hyperlink was removed.

Thanks in advance
Comment 1 raal 2015-05-31 19:58:00 UTC
I can not confirm with Version: 5.1.0.0.alpha1+
Build ID: 1a8e9dae32997bf199dbd192058fcd8f187ddc49
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-05-31_03:57:11
path: /tmp/BOOKMARK TEST.odt

Seems to be fixed, please test with newer version. Thank you
http://dev-builds.libreoffice.org/daily/master/
Comment 2 Matthias Braun 2015-05-31 20:32:08 UTC
Thank you very much raal for looking into it.

I retried it with 5.1. Links with spaces inside still don't work for me in XLSX files.

I realized that the link is only removed by Excel after Calc converted the absolute path to a relative one.
This happens when I open an XLSX that contains a link with Calc, make a change such as editing some cell, and then save it.
After the path is now relative, the linked file won't open anymore in Calc and causes the described error message including the removal of the link when the XLSX is opened with Excel.

Thanks in advance,
Matthias
Comment 3 raal 2015-05-31 20:56:41 UTC
(In reply to Matthias Braun from comment #2)

> 
> I realized that the link is only removed by Excel after Calc converted the
> absolute path to a relative one.
> This happens when I open an XLSX that contains a link with Calc, make a
> change such as editing some cell, and then save it.

Could you attach test xlxs file?
Comment 4 Matthias Braun 2015-05-31 21:09:32 UTC
Created attachment 116206 [details]
XLSX that links to a file with spaces

This file, when opened in Excel, causes a warning message and the link to be removed.
Comment 5 Buovjaga 2015-06-09 12:15:40 UTC
(In reply to Matthias Braun from comment #4)
> Created attachment 116206 [details]
> XLSX that links to a file with spaces
> 
> This file, when opened in Excel, causes a warning message and the link to be
> removed.

Confirmed in Excel.

Win 8.1 32-bit
MSO 2013
Comment 6 QA Administrators 2017-01-03 19:42:14 UTC Comment hidden (obsolete)
Comment 7 Gabor Kelemen (allotropia) 2019-03-19 10:25:48 UTC
Created attachment 150096 [details]
The example file saved by current Calc master

I can't reproduce the problem anymore in:

Version: 6.3.0.0.alpha0+
Build ID: 0faf4e5c2e98219b17e042594710f6872bf6a615
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

Also extended the original example file with a link to a custom file containing many spaces in its name, and it seems to generate the same link as Excel.