Description: When using Sheet > Link to External Data... and pointing to a website that has more than 9 tables, the order of tables in the dialogue is not the same as in the source. 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". Actual Results: The tables are listed in the order: HTML_1 HTML_10 HTML_11 HTML_12 HTML_2 HTML_3 etc. Expected Results: The tables should be listed in the same order as in the HTML page's source code. Reproducible: Always User Profile Reset: No Additional Info: This matters as you can pick several tables to import. If you pick a range or cherry-pick a number of them (using Ctrl + click), the user would expect to see them imported into the spreadsheet in the same order as in the original source. A cumbersome workaround would be to: - Import table 1 - Import the ones you want between 2 and 9 - Import the ones you want between 10 and 12 Alternatively, import HTML_tables and remove the ones you don't want to keep. Tested on 3 versions: Version: 7.2.0.0.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 Calc: threaded Version: 7.1.3.2 / LibreOffice Community Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1 CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Version: 7.0.4.2 Build ID: 00(Build:2) CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Ubuntu package version: 1:7.0.4_rc2-0ubuntu0.18.04.2 Calc: threaded
Confirmed. Looks like LibO is sorting them alphanumerically before listing them. Adding Andreas as he expressed interest in bug 127484 Arch Linux 64-bit Version: 7.1.3.2 / LibreOffice Community Build ID: 10(Build:2) CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: kf5 Locale: fi-FI (fi_FI.UTF-8); UI: fi-FI 7.1.3-1 Calc: threaded
Should we just sort them by order of appearance or even add a right click context menu? Or would that be a little bit overkill?
What would the right-click menu give as options, Andreas?
Something like sort with a submenu including the two options alphabeitcally and by actual order.
Wondering if this option would be better offered with a table format, with column headings: name | caption | position in document And the user can click on the headings to sort whichever way they want. But that might mean "HTML_all" and "HTML_tables" need to be outside that table?
Hm, not all tables may have a caption and even the html_all and html_tabkes need special handling. Imho it is a little bit overkill including all these sortings and headings. Maybe we should go just for sorting with document order, but maybe someone can create a small mockup how to display the tables.
I'd be happy with a simple solution as a first step! :) i.e. in order of appearance by default, and "HTML_tables" and "HTML_all" listed separately at the bottom.
Proposed patch: https://gerrit.libreoffice.org/c/core/+/116767/1 Maybe there exists a better way to iterate over the indexes in the ranged name.
Thanks Andreas for designing a solution. Unfortunately, I don't have the expertise to review the change!
Minor note: keyword patch is used, if someone attaches a patch to the report or pastes it into a comment
Also reproduced in earlier version 6.2.5: Version: 6.2.5.2 Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; Locale: en-AU (en_AU.UTF-8); UI-Language: en-US Calc: threaded
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/462f9d1f589a7afd66d3fc61925467d3b68e5b31 tdf#142600 - List tables in order of their appearance It will be available in 7.3.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.
Perfect. Thanks for fixing this bug. Verified in Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: 612d5b1a04fe022a34018d901bb9b052791d54e5 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Fabulous, thank you Andreas! Verified as well in: Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: 1dd4a80fa076bedb3a82821517036bad8dd79857 CPU threads: 4; OS: Linux 5.4; 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-07-26_22:41:19 Calc: threaded
Added to release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/7.3&diff=375762&oldid=374733
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d7fb6b22cf7e66eb2594001cc42c6bff8b5a49e2 tdf#95217, tdf#142600: sc: Add UItest It will be available in 7.4.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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2f2cd7558e1d01f9670436412d62d03f28bab2c1 tdf#142600 - External links dialog: list database ranges 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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/0290a06c016186588720d73d6786acdc9f3880e6 tdf#142600 - External links dialog: list database ranges It will be available in 7.5.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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/4386e5555dcf40b54343771fb24287641611b135 tdf#142600 - External links dialog: list database ranges It will be available in 7.6.1. 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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-6-0": https://git.libreoffice.org/core/commit/bcbcb3f692f51085ba8a9ad6ea2be410dc79dd7b tdf#142600 - External links dialog: list database ranges It will be available in 7.6.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.