I just want a "hello world" and after an embarrassing number of hours, its still not working. I'm new to Javascript and Google App script.
Here is the simple script that fails to enter the "Hello" and I would appreciate any tips you have on getting this to work.
As you can see in the commented lines, I've tried many ways to get my "Hello" out there, but none of them work yet. The menu does work. Thanks for your help
Really what I want to do is to be able to move from cell to cell in a spread sheet, get the values there, assign it to a variable. And then to write the var value to a cell after a condition is meet in the script.
function onOpen() {
var ss = SpreadsheetApp.getActive();
var menuItems = [
{name: 'Generate Coin Trades', functionName: 'GCTrades_'}
];
ss.addMenu('CoinTrade', menuItems)
function GCTrades_() {
var ss = SpreadsheetApp.getActive();
SpreadsheetApp.setActiveSheet(ss.getSheetByName('Prices'));
sheet.getRange("$H$1").setValue('Hello');
//settingsSheet.activate();
// One before the last row that has been entered in the spreadsheet
// var LastRow = sheet.spreadsheet.getLastRow() -1;
// var cell1 SpreadsheetApp.getActiveSheet().getRange(LastRow,16);
// var cell = spreadsheet.getRange("$H$1");
// cell.setvalue('Hello')
//var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// var cell = sheet.getRange(1655,16);
// var cell = 'H1655'
// cell.setValue("Hello");
//var count = SpreadsheetApp.getActiveSheet().getRange(2, 3, 6, 4)
// Spreadsheet.getActiveSheet().getRange(LastRow,16).setvalue('Hello')
// SpreadsheetApp.getActiveRange().setValue('hello')
}