Just go to Tools -> Script-Manager -> New
Name it something like MtGox.gs and insert the following code:
function getMtGoxPrice(s1, s2) {
if (s1 == null){ s1 = "btc"; }
if (s2 == null){ s2 = "usd"; }
var symbol = s1+""+s2;
symbol = symbol.toUpperCase();
var url = "https://data.mtgox.com/api/2/"+symbol+"/money/ticker";
var data = UrlFetchApp.fetch(url);
var btcdata = data.getContentText();
var object = JSON.parse(btcdata);
var price = parseFloat(object["data"]["last"]["value"]);
return price;
}
Now you can simply click into a spreadsheet cell and enter
=getMtGoxPrice()
=getMtGoxPrice("BTC", "EUR")