So imagine I have a string,
var greet = "hi"
And I want to put it in the next available row in a Google Sheet, how can I do that?
So imagine I have a string,
var greet = "hi"
And I want to put it in the next available row in a Google Sheet, how can I do that?
This can easily be done in Google Apps Script. Google Apps Script is a cloud-based JavaScript platform that lets you integrate with and automate tasks across Google products.
To go to Google Apps Script
Code:
function myFunction() {
//this code will insert hi to the next available row of active sheet
var sheet = SpreadsheetApp.getActiveSheet()
var greet = "hi"
sheet.appendRow([greet])
}
Example:
Output:
Note: If Google Apps Script is not an option for you, you have to use the Google Sheets API