Last active
January 4, 2018 18:36
-
-
Save pedromenezes/dbefe4ee0fece754ada77e93ffd967e0 to your computer and use it in GitHub Desktop.
This file contains 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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment