[Solved] Import web page table into spreadsheet

Discuss the spreadsheet application
Post Reply
Marscaleb
Posts: 25
Joined: Wed Sep 07, 2011 9:09 am

[Solved] Import web page table into spreadsheet

Post by Marscaleb »

I found a nice page on wikipedia with a lot of data that I need in my spreadsheet, but copying each cell by hand is quite tedious.
Is there a way I can convert a table on a web page into an .ods file?
Last edited by robleyd on Thu Jul 25, 2024 3:22 am, edited 1 time in total.
FJCC
Moderator
Posts: 9623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Is there a way to import/convert a web page table into a spreadsheet?

Post by FJCC »

Maybe. I would start out trying to paste it as Unformatted Text using the Edit -> Paste Special menu item. What happens when you do that?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
robleyd
Moderator
Posts: 5505
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Is there a way to import/convert a web page table into a spreadsheet?

Post by robleyd »

Can you give a link to the page in question? It's much easier to provide an answer if we have a specific example. For instance, it may be that the "table" you see isn't a table, but just some fancy layout that looks like a table.
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Is there a way to import/convert a web page table into a spreadsheet?

Post by Villeroy »

menu:Insert>Link to external data
Paste the URL, hit Enter
In the next dialog choose "HTML_all".
Under menu:Edit>Links... you can modify the link. I switched to table "HTML_1" which only imports the intended table. Since this particular table is not expected not change, you may also delete all unwanted content and break the link to the website.

In this sample, all cell contents are text because all the figures have a "m" or "ft" suffix.
Attachments
aoo111748.ods
List of elevation extremes by country from en.wikipedia.org
(36.15 KiB) Downloaded 66 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Marscaleb
Posts: 25
Joined: Wed Sep 07, 2011 9:09 am

Re: Is there a way to import/convert a web page table into a spreadsheet?

Post by Marscaleb »

Villeroy wrote: Wed Jul 24, 2024 11:38 am menu:Insert>Link to external data
Paste the URL, hit Enter
In the next dialog choose "HTML_all".
Under menu:Edit>Links... you can modify the link. I switched to table "HTML_1" which only imports the intended table. Since this particular table is not expected not change, you may also delete all unwanted content and break the link to the website.

In this sample, all cell contents are text because all the figures have a "m" or "ft" suffix.
That did it! Thank you!
Post Reply