Bug 100993 - Link to external data from url doesn't work
Summary: Link to external data from url doesn't work
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-External-Datalink
  Show dependency treegraph
 
Reported: 2016-07-18 19:21 UTC by paolo_debortoli
Modified: 2018-04-30 15:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshots of dialog boxes (233.59 KB, image/jpeg)
2016-07-18 19:21 UTC, paolo_debortoli
Details
File with link to url (12.49 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-18 21:31 UTC, m_a_riosv
Details
Link to External Data is badly broken (1.58 MB, image/gif)
2018-01-11 07:39 UTC, Dan Dascalescu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paolo_debortoli 2016-07-18 19:21:55 UTC
Created attachment 126288 [details]
screenshots of dialog boxes

I want to link actively data from the url:  https://finance.google.com/finance/info?q=BIT%3aENEL  in a cell in calc.  Then I use the menu (I use Italian, don't know exactly the english/german menu):    sheet-> link external data;  it open a first dialog box, I insert the url and press enter; then it goes to a second dialog box, asking for definitions, reading the data;  then I press ok and  it goes back to the first dialog box, without data, options or whatelse...  I made different attempts, with different definitions, but it returns always to an empty first dialog box.
Comment 1 m_a_riosv 2016-07-18 21:31:55 UTC
Created attachment 126291 [details]
File with link to url

Ciao @Paolo, thanks for reporting.

As I know csv files can not be linked in this way, but you can link it through 'Insert sheet from file' marking the link option, they haven't tables like html or ranges as can have and ods file.

But you link doesn't seem to have an csv file.

Attached a file with a link to that url.
Comment 2 Thomas Hackert 2016-07-25 12:53:57 UTC
Hello Paolo, M.a.riosv,
(In reply to m.a.riosv from comment #1)
> Created attachment 126291 [details]
> File with link to url
> 
> Ciao @Paolo, thanks for reporting.
> 
> As I know csv files can not be linked in this way, but you can link it
> through 'Insert sheet from file' marking the link option, they haven't
> tables like html or ranges as can have and ods file.
> 
> But you link doesn't seem to have an csv file.

I think, that that site is not a cvs nor a html file but some kind of query (JS maybe?), as it uses "id", "t" and the like ... ;) @Paolo: I can confirm this bug with
OS: Debian Testing AMD64
LO: Version: 5.1.5.1
Build-ID: 1:5.1.5~rc1-1
CPU-Threads: 4; BS-Version: Linux 4.5; UI-Render: GL; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
(Debian's own version)

LO: Version: 5.2.0.3
Build-ID: 7dbd85f5a18cfeaf6801c594fc43a5edadc2df0c
CPU-Threads: 4; BS-Version: Linux 4.5; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE.UTF-8)

and

Version: 5.3.0.0.alpha0+
Build-ID: f9f090d0d0f2b454d6c1dd14fe735e7e83fda9da
CPU-Threads: 4; BS-Version: Linux 4.5; UI-Render: Standard; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-07-24_06:28:54
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
(the last two versions are parallel installed ones, following the instructions from https://wiki.documentfoundation.org/Installing_in_parallel/Linux)

But ... Are you sure this worked in the past and/or with a different office suite? If I use a browser to go to this site, I just see

<quote>
// [ { "id": "668641" ,"t" : "ENEL" ,"e" : "BIT" ,"l" : "4.04" ,"l_fix" : "4.04" ,"l_cur" : "€4.04" ,"s": "0" ,"ltt":"2:48PM GMT+2" ,"lt" : "Jul 25, 2:48PM GMT+2" ,"lt_dts" : "2016-07-25T14:48:52Z" ,"c" : "+0.01" ,"c_fix" : "0.01" ,"cp" : "0.25" ,"cp_fix" : "0.25" ,"ccol" : "chg" ,"pcls_fix" : "4.028" } ]
</quote>

in it. I have tested it with Opera 38.0.2220.41, Firefox 38.0.2220.41 and onkeror.mozdev.org conkeror 1.0.3 (Debian-1.0.3-1), and I am not sure, if this is really a bug in LO or on that site ... :(
HTH
Thomas.
Comment 3 paolo_debortoli 2016-07-25 14:41:33 UTC
Hi. somebody repoorted by email that source is a json data type. the documentation specify:  use an html data source, I inserted html code and it worked fine.  However i experienced somehow json data can be used and inserted somehow (they appear in the second window, but not in the last one); but in other ways they appear 'unpacked' in the cells. I guess you should be able to manage them in the same way as html data  (but I don't know exactly).
Comment 4 Buovjaga 2016-07-27 20:05:56 UTC
Just to make something clear: JSON parsing in Calc is currently only a twinkle in the eyes of developers. So if it seems to be working, it is an accident.
Comment 5 Carlos 2017-04-04 15:22:25 UTC
I can't reproduce the bug in
Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group

The data gets updated.
Comment 6 Jean-Baptiste Faure 2017-09-09 12:46:05 UTC
The link https://finance.google.com/finance/info?q=BIT%3AENEL gives ERR 404.

Any working link available to test?

Set status to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 7 Dan Dascalescu 2018-01-11 07:39:19 UTC
Created attachment 139046 [details]
Link to External Data is badly broken

Does Sheet -> Link to External Data even work in Cal 5.4.2.2?

Try https://people.sc.fsu.edu/~jburkardt/data/csv/addresses.csv

There are a number of annoying usability issues with that dialog. Let me know if I need to create separate issue, but the bottom line is that it's impossible to use:

1. After you enter the URL, there's no button to do anything with it. "Browse" doesn't load data from the URL, it opens the file system open dialog. The user needs to think to press Enter. I didn't think of that in the beginning and stared blankly at the dialog.

2. After you press Enter, the Text Import dialog appears. For a CSV file, you can just press OK with the example I linked above. But then nothing happens. OK, now what? I had to look up the help, which I really really should not need for such a simple operation. The help says I need to select a range. Fine.

3. After selecting two columns and pressing OK, the "Available Table/Ranges" is still blank.

Link to External Data is completely broken. Is there a test suite for this function?
Comment 8 Jean-Baptiste Faure 2018-01-11 13:46:23 UTC
I guess Calc is waiting for an html webpage in which it can find one or several tables. For example try https://finance.google.com/finance#stockscreener. You will see appearing several items under Available Tables/Ranges. You can try to select HTML_all or HTML_tables and you will see data imported in you spreadsheet.

Best regards. JBF
Comment 9 Jean-Baptiste Faure 2018-01-14 19:13:19 UTC
(In reply to Jean-Baptiste Faure from comment #8)
> I guess Calc is waiting for an html webpage in which it can find one or
> several tables. For example try
> https://finance.google.com/finance#stockscreener. You will see appearing
> several items under Available Tables/Ranges. You can try to select HTML_all
> or HTML_tables and you will see data imported in you spreadsheet.
> 
> Best regards. JBF

Confirmed by comment #7 of bug 35040 (enhancement request) and specifically this page of the help: https://help.libreoffice.org/Calc/Inserting_External_Data_in_Table_WebQuery

So closing as WorksForMe from my previous comment. Feel free to reopen if you disagree.

Best regards. JBF
Comment 10 paolo_debortoli 2018-04-30 15:41:56 UTC
hi.  sorry guys,  working with LO 6.0  the behaviour is corrected  (and performs much better).    bug  (for me)  is closed!