LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2019, 10:49 AM   #1
GPGAgent
Member
 
Registered: Oct 2018
Posts: 138

Rep: Reputation: Disabled
Question LibreOffice Calc -Stock market (equities) price updates


Hi,

I'm looking for a method to update a portfolio of stocks (equities) I track in a LibreOffice Calc spreadsheet automatically, somewhat like the Googlefinance functions you can use on a Google Docs spreadsheet in Chrome, e.g. =GoogleFinance("LON.BP.","price") would return the value of a share in BP on the London stock exchange.
 
Old 03-16-2019, 06:50 PM   #2
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 485

Rep: Reputation: 273Reputation: 273Reputation: 273
I suppose you could use wget or curl to grab the data and your own script to put it into a csv file which can be opened in Calc. A nice little programming project.
 
Old 03-16-2019, 07:11 PM   #3
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,577

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
Excel has/had a "remote data" option which would pull data from a URL. Does Calc have the same ability?
Help menu can be your friend.
 
Old 03-16-2019, 07:14 PM   #4
xl
Member
 
Registered: Feb 2013
Location: Germany, EU
Distribution: Debian (stable release)
Posts: 67

Rep: Reputation: 9
LibreOffice has =webservice (and =importxml) to call from JSON files. You will need links but I only know links to grab BTC exchange courses.

Another alternative is to "insert sheet" from online or from a file and then you can choose an online link. From that sheet you can export data to your original sheet.

Last edited by xl; 03-16-2019 at 07:28 PM.
 
1 members found this post helpful.
Old 03-17-2019, 10:37 AM   #5
GPGAgent
Member
 
Registered: Oct 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by xl View Post
LibreOffice has =webservice (and =importxml) to call from JSON files. You will need links but I only know links to grab BTC exchange courses.

Another alternative is to "insert sheet" from online or from a file and then you can choose an online link. From that sheet you can export data to your original sheet.

I've seen this in my searches:
Code:
=NUMBERVALUE(WEBSERVICE("http://download.finance.yahoo.com/d/quotes?s="&U4&"&f=l1"),".")
where U4 cell contains LON:RDSB = i.e. Royal Dutch Sheel (B) shares on the London Stock exchange
But no luck getting it to work.

curl and wget look possible, need to see how they work first.
Cheers folks
 
Old 03-17-2019, 11:21 AM   #6
GPGAgent
Member
 
Registered: Oct 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Okay folks I've found this:
This page:
https://www.bloomberg.com/markets/chart/data/1D/ulvr:ln
returns this:

Code:
precision	2
prev_close	4193
data_values
The data I want in a cell is on line 2 second item: 4193

I've tried webservice:

Code:
=webservice"https://www.bloomberg.com/markets/chart/data/1D/ulvr:ln"
and get an error
Code:
err:509
This
Code:
=WEBSERVICE("https://www.bloomberg.com/markets/chart/data/1d/ulvr:ln")
doesn't error, but doesn't return anything.

It's getting close I think but I need help on the syntax, google hasn't found anything useful so far

Cheers
 
Old 03-17-2019, 12:00 PM   #7
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,577

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
This, perhaps? https://help.libreoffice.org/Calc/WEBSERVICE
 
Old 03-17-2019, 12:26 PM   #8
xl
Member
 
Registered: Feb 2013
Location: Germany, EU
Distribution: Debian (stable release)
Posts: 67

Rep: Reputation: 9
Quote:
Originally Posted by GPGAgent View Post
I've seen this in my searches:
Code:
=NUMBERVALUE(WEBSERVICE("http://download.finance.yahoo.com/d/quotes?s="&U4&"&f=l1"),".")
where U4 cell contains LON:RDSB = i.e. Royal Dutch Sheel (B) shares on the London Stock exchange
But no luck getting it to work.

curl and wget look possible, need to see how they work first.
Cheers folks
My search engine says that download.finance.yahoo.com is down since Jan. 2018.
Maybe use https://finance.yahoo.com/quote/RDS-B?p=RDS-B ?

My VPN is blocked from Bloomeberg so can't test right now.
If curl/wget don't work maybe also try this:
https://help.libreoffice.org/Calc/In...Table_WebQuery
 
Old 03-17-2019, 12:35 PM   #9
GPGAgent
Member
 
Registered: Oct 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by xl View Post
My search engine says that download.finance.yahoo.com is down since Jan. 2018.
Maybe use https://finance.yahoo.com/quote/RDS-B?p=RDS-B ?

My VPN is blocked from Bloomeberg so can't test right now.
If curl/wget don't work maybe also try this:
https://help.libreoffice.org/Calc/In...Table_WebQuery
Yep that's right about Yahoo, I knew that.

Bloomberg works fine for me, I can see the share price, I just need to get it into a cell!
 
  


Reply

Tags
calc, libreoffice


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Stock price Program/Script wanted dmchess Linux - Software 9 12-10-2017 12:38 PM
CLI command to pull Stock Price and volume from Google dmchess Linux - Desktop 15 12-10-2017 10:14 AM
Stock market "find the best price model" program cigarstub Programming 1 01-07-2007 08:24 AM
Processor Upgrade (Pentium M) VS. Price: Which has the best price/tech ratio? hanzj Linux - Laptop and Netbook 8 03-22-2005 06:18 PM
Upgrading stock 2.4.22 kernel to 2.5.x then to 2.6.6 with existing stock .config file Kyl3 Slackware 8 06-09-2004 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration