Value from a web page placed into a cell

Discuss the spreadsheet application
Locked
User avatar
RMRavik
Posts: 9
Joined: Sun Nov 24, 2024 6:46 pm
Location: Aberdeen, Washington

Value from a web page placed into a cell

Post by RMRavik »

Using Calc I have an inventory of precious metals. There is a website that has a running chart of spot prices. There is a box on this site that shows the current price. I would like the contents of that box placed into a cell at the activation of that cell.
At present I hyperlink to the site, copy the box and then paste the info into the cell.
It seems like I could do it with a macro but am not familiar with them.
I think I just answered my question. I'll keep looking.
Thanks for your help
Open Office 4.1.14 - Windows 11, 64
User avatar
robleyd
Moderator
Posts: 5504
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Value from a web page placed into a cell

Post by robleyd »

Depending on how the web page is structured, you might be able to use Linking to external data. There is also information in the offline HELP - search external data.
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
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Value from a web page placed into a cell

Post by Lupp »

Users of LibreOffice V 4.2 or higher may also try WEBSERVICE() combined with FILTERXML().

Please note:
I'm not an expert in pulling details from the web, and used the mentioned functions myself only once for a solution years ago.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
RMRavik
Posts: 9
Joined: Sun Nov 24, 2024 6:46 pm
Location: Aberdeen, Washington

Re: Value from a web page placed into a cell

Post by RMRavik »

I haven't found a web page that will allow me to use the only number I'm after so I'm still searching. I did find one that allows me to use a range of data with the number I'm after but I can't figure out how to access that particular number. I did set up a link to the site so that I can copy the number and place it for now. I'll figure it out and thanks for your help.
Open Office 4.1.14 - Windows 11, 64
karimali
Posts: 4
Joined: Wed Jan 01, 2025 2:12 pm

Re: Value from a web page placed into a cell

Post by karimali »

You can use the WEBSERVICE and FILTERXML functions in Calc to fetch data from a website if it provides a structured XML or API. However, if the site doesn’t support this, you can automate the process with a macro.

Here is the basic macro guide:

Enable macros in OpenOffice (Tools > Options > Security > Macro Security).
Use a script to fetch data from website (you might need additional tools like Python or JavaScript).
If you’re unfamiliar with macros, manual copying may still be the easiest option.
OpenOffice 4.1.14
User avatar
robleyd
Moderator
Posts: 5504
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Value from a web page placed into a cell

Post by robleyd »

You can use the WEBSERVICE and FILTERXML functions in Calc
Note that these functions are not available in OpenOffice Calc - they are, however, in LibreOffice.
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
RMRavik
Posts: 9
Joined: Sun Nov 24, 2024 6:46 pm
Location: Aberdeen, Washington

Re: Value from a web page placed into a cell

Post by RMRavik »

I've had to redirect my focus but thanks. I am sure I will be back
Open Office 4.1.14 - Windows 11, 64
Locked