Monero price in Google Spreadsheet

Thanks for posting this. I'm not a programmer in the slightest and I've tried to follow your directions as much as possible but can't seem to get this to work. This is what I've done, if you have any advice, it's greatly appreciated. I get "Missing (before function parameters. (line 24, file "Code") which is the line "function onOpen() {"

function /** * Retrieves exchange rate from Poloniex. */ function updatePoloniex() { var response = UrlFetchApp.fetch("https://poloniex.com/public?command=returnTicker"); // TODO: set your sheet name here var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("XMR tracker"); var json = JSON.parse(response.getContentText()); var rate = json.BTC_XMR.last;

// TODO: set column coordinates here in format (column, row); this is now set to A1 sheet.getRange(3, 5).setValue(rate); }

/** * Adds a custom menu to the active spreadsheet, containing a single menu item * for invoking the function specified above. * The onOpen() function, when defined, is automatically invoked whenever the * spreadsheet is opened. * For more information on using the Spreadsheet API, see * https://developers.google.com/apps-script/service_spreadsheet */ function onOpen() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); var entries = [{ name : "Update Poloniex rate", functionName : "updatePoloniex" }]; sheet.addMenu("Scripts", entries); }; {

}

/r/Monero Thread