Viewing a response to: @cryptoblock/re-konstantint-cryptocurrency-accounting-in-excel-20170903t121255284z
Yes, you can do the same in OpenOffice as well. Go to *Tools ⇒ Macros ⇒ Organize Macros ⇒ OpenOffice Basic...*, create a new module under your current document, and paste the following, slightly modified, version of the code in the newly opened editor window: ``` Public Function HttpGet(ByVal requestUrl As String) As String Set http = CreateObject("WinHttp.WinHttpRequest.5.1") With http .Open "GET", requestUrl, True .Send "" .WaitForResponse 10 HttpGet = .ResponseText End With End Function Public Function GetCryptoCurrencyPrice(ByVal name As String, ByVal baseCurrency As String, Optional cacheBuster As Variant) As Double GetCryptoCurrencyPrice = -1# json = HttpGet("https://api.coinmarketcap.com/v1/ticker/" & name & "/?convert=" & baseCurrency) For Each Line In Split(json) If found Then GetCryptoCurrencyPrice = CDbl(Mid(Line, 2, Len(Line) - 3)) Exit Function End If If Line = """price_" & LCase(baseCurrency) & """:" Then found = True End If Next End Function ```
post_id | 11,874,447 |
---|---|
author | konstantint |
permlink | re-cryptoblock-re-konstantint-cryptocurrency-accounting-in-excel-20170903t232907870z |
category | howto |
json_metadata | "{"app": "steemit/0.1", "tags": ["howto"]}" |
created | 2017-09-03 23:29:09 |
last_update | 2017-09-03 23:29:09 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-09-10 23:29:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,111 |
author_reputation | 360,301,994,866 |
root_title | "Cryptocurrency Accounting in Excel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |