Currently, using a website URL in "Sheet > Link to External Data..." only shows a list of generic identifiers of the type "HTML_1", which makes it difficult to identify the right table when there are many available.
The HTML <caption> tag could help telling the tables apart.
Steps to Reproduce:
1. Open Calc
2. Go to "Sheet > Link to External Data..."
3. Paste a URL in "URL of External Data Source", for example https://en.wikipedia.org/wiki/QS_World_University_Rankings
4. Press Enter on the keyboard
5. Use defaults in the "Import Options" dialog and click "OK".
The "Available Tables/Ranges" show a list of tables named "HTML_<positional_number>. (see attached screenshot)
Naming the tables in the list with whatever is between the corresponding <caption></caption> – if found when parsing – could help identify the right one. For example, the tables could be named with the pattern:
HTML_<positional_number> - <first 40 characters of caption>...
User Profile Reset: No
Build ID: 1:6.3.1~rc2-0ubuntu0.18.04.1~lo1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-AU (en_AU.UTF-8); UI-Language: en-GB
Sounds good -> NEW
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":
tdf#127484 - Use HTML caption tag to name externally linked tables
It will be available in 7.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:
Affected users are encouraged to test the fix and report feedback.
Thank you so much for the work, Andreas!
Verified as fixed in:
Version: 220.127.116.11.alpha1+ / LibreOffice Community
Build ID: e718f0e703c0fb33a0b1b5efe7b13b02c25f3335
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-30_21:49:59
I mentioned it with a screenshot in the Release Notes: https://wiki.documentfoundation.org/ReleaseNotes/7.2#General_improvements_2
As it is very much related to this, and as you've recently been looking at the code, you might be interested in this enhancement request I just created for the same dialogue: Bug 142600
Thank you for the verification! I will have a look at the enhancement, after someone approves it.