Closed ddarbs closed 6 years ago
Hey iKrazy, thanks for the help. My code is giving me the correct ETH conversion but it's off by a factor of 100. As in the decimal is 2 places to the left. Is it me or the code?
@robtylerphillips my fault, I think I fixed it
@iKrazy, I just copied and pasted that code in there and it moved the decimal over to the left two more places (now 4 places to the left from where it should). I just pasted this at the end overwriting your former code.
Sorry I am trudging through learning java...
@robtylerphillips yeah you will need to delete the old code, and make sure you update the formula in the sheet to use E2. I will get you a pastebin of my script tomorrow, so you can copy paste the whole thing.
@robtylerphillips https://pastebin.com/raw/f3FL9sps if you want to try copy pasting the one I am working with. Be sure to copy your current coin list before you delete it.
zomskii showed you can do the ETH conversion with no new functions by changing
var targetCurrency = 'usd'
to var targetCurrency = 'eth'
I'm getting an error for some reason now.
2/3/18 5:52 PM | getData | Cannot call SpreadsheetApp.getUi() from this context. (line 64, file "Code") | time-based | 2/3/18 5:52 PM
Try just running the function that's pulling the data. Are you getting this when running it manually or through triggers? If you don't have the page open you can get this error.
Here are the triggers I use:
request from: https://www.reddit.com/r/cryptosheets/comments/7t3djc/possible_to_add_price_eth_to_cryptosheets/
this is what I have so far, use it with '=getEthereumConversion(E2)' and copy paste down