Tutorials
These tutorials are intended to help you get started with Google Apps Scripts as soon as possible. Some of these tutorials focus on the fundamentals, while others provide in-depth analysis of a complex script, and still others address specific nuances of the Google Apps Script system itself. Basics and working with Google Sheets
You are First Script — This tutorial covers the fundamentals of script writing and execution, demonstrating how to create a Google Doc and send an email.
You are First Custom Function — This tutorial will show you how to create custom spreadsheet functions that can be used in regular spreadsheet formulas.
Sending Emails from a Spreadsheet — This tutorial demonstrates how to use spreadsheet data to send emails to various recipients.
Removing Duplicate Rows in a Spreadsheet — This tutorial demonstrates how to remove duplicates when working with data in Apps Script.
The While Loop
Assume you're creating a program to guess a secret number. Assume that the secret number is 70. Your program generates a number between 0 and 100 with each iteration. If this number equals 70, the program will be terminated. Otherwise, it moves on to the next iteration and attempts to guess the next number.
It is hard to use a for loop here because you do not know how many guesses will be needed before your program correctly guesses 70. This is where a While loop becomes handy.
Break
The break statements can be used to exit a loop or to advance to the next iteration. The code within the loop following one of these statements will not be executed.
Example
function adddata(){
var ss=SpreadsheetApp.getActiveSpreadsheet();
var messageshow=SpreadsheetApp.getUi();
var Textbox=ss.getSheetByName("Sheet2").getRange(1,8).getValue();
var InsertData=[[ss.getRange("H1").getValue(),ss.getRange("H2").getValue(),ss.getRange("H3").getValue()]]
var Insert=ss.getSheetByName("Sheet1")
var Endrow=ss.getSheetByName("Sheet1").getLastRow();
while(Endrow<=Textbox){
if(Endrow==Textbox){
messageshow.alert("Your Account has been Already");
break;
}
Insert.getRange(Insert.getLastRow()+1,1,1,3).setValues(InsertData);
break;
}}
Please Watching My Video is Below
CASINO IN BOSTON, OK (FOX 7) - Hotel and casino in
ReplyDeleteCASINO IN BOSTON, OK 당진 출장안마 (FOX 7) -- AUGUSTIN (FOX 통영 출장안마 7) -- 부산광역 출장샵 AUGUSTIN (FOX 7) – AUGUSTIN (FOX 춘천 출장안마 7) – 양주 출장마사지 AUGUSTIN (FOX 7) – AUGUSTIN (FOX 7) –