Ask Your Question
0

Ways to make a live spreadsheet

asked 2017-07-15 22:26:01 +0200

creativeflower gravatar image

updated 2017-07-16 10:11:55 +0200

what are the options to get live data into the spreadsheet to update market tickers regularly. I wrote some Basic Timer but to get this API working I dunno what options I have, could some pro's enlighten me?

I like opensource, people made it already in google docs: https://docs.google.com/spreadsheets/... which i oppose.

I am here, but lost: http://api.libreoffice.org/examples/e... If possible i would stick with libreoffic basic, otherwise we need glue code. So far I found: http://api.libreoffice.org/examples/b...

Function GetValue( oDocument As Object,_
                   sName As String,_
                   fDate As Double, fValue As Double )

    Dim sUrl As String, sFilter As String
    Dim sOptions As String
    Dim oSheets As Object, oSheet As Object

    oSheets = oDocument.Sheets
    If oSheets.hasByName("Link") Then 
        oSheet = oSheets.getByName("Link")
    Else
        oSheet = _
          oDocument.createInstance("com.sun.star.sheet.Spreadsheet")

        oSheets.insertByName("Link", oSheet)
        oSheet.IsVisible = False
    End If

    sUrl = "http://quote.yahoo.com/d/quotes.csv?s=" +_
     sName + "&f=sl1d1t1c1ohgv&e=.csv"

    sFilter = "Text - txt - csv (StarCalc)"

    sOptions = _
    "44,34,SYSTEM,1,1/10/2/10/3/10/4/10/5/10/6/10/7/10/8/10/9/10"

    oSheet.LinkMode = com.sun.star.sheet.SheetLinkMode.NONE
    oSheet.link(sUrl, "", sFilter, sOptions, 1 )

    fDate = oSheet.getCellByPosition(2,0).Value
    fValue = oSheet.getCellByPosition(1,0).Value
    GetValue = (fDate <> 0)
End Function
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-08-21 16:41:06 +0200

librebel gravatar image

Hello @creativeflowers,

Please have a look at these two LibreOffice extensions:

LibreWeb - allows to fill the spreadsheet cells with data from different web pages.

SMF Extension for LibreOffice Calc - allows you to create customized spreadsheets with stock market data directly from the web.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-15 22:26:01 +0200

Seen: 533 times

Last updated: Aug 21 '17