This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="http://dolarhoje.com/" class="dolar-hoje-button" data-currency="dolar">Dólar Hoje</a><script async src="//s3.amazonaws.com/dolarhoje-widgets/v1.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dolarHojeExtract(url, reference){ | |
| return UrlFetchApp.fetch(url.replace(/([^\/]+)$/, '$1/') + "cotacao.txt").getContentText(); | |
| } | |
| function refresh() { | |
| SpreadsheetApp.getActiveSheet().getActiveCell().setValue("Última atualização: " + new Date().toLocaleString()); | |
| } | |
| function onOpen(e) { | |
| SpreadsheetApp.getUi().createMenu('Dólar Hoje').addItem('Atualizar', 'refresh').addToUi(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dolarHojePegaCotacao(url, reference){ | |
| return parseFloat(UrlFetchApp.fetch(url.replace(/([^\/]+)$/, '$1/') + "cotacao.txt").getContentText().replace(',', '.')); | |
| } | |
| function refresh() { | |
| SpreadsheetApp.getActiveSheet().getActiveCell().setValue("Última atualização: " + new Date().toLocaleString()); | |
| } | |
| function onOpen(e) { | |
| SpreadsheetApp.getUi().createMenu('Dólar Hoje').addItem('Atualizar', 'refresh').addToUi(); |
OlderNewer