Posts

Showing posts from May, 2022
Feeling Lucky?

Create New Google Docs with Apps Script

Image
Hello everyone, In this article we will try to create a new document using code in Apps Script. If you never use and create apps script before, you can check my article in here : Create Your First Code in Apps Script (randomusefuljourney.blogspot.com) Here is the code to create a new Google Docs : function myFunction () {    const doc = DocumentApp . create ( "Test New Doc 1" ); }   And here is the result in my google drive : Thank you.  

How to use For Loops in Apps Script

Image
  Hello everyone, In this article we will try to create a looping code in Google Apps Script with For Loop. The use of looping code is to run the same formula several times without writing it one by one.  Let's create rows number in the right side of this table start with 1 : So, to do this, we could write for loops code in our script. Basic form of for loops code is : for ( var ...; ....; ...){   }   “var ….;” is to declare the variable and the initial number. The middle “….. ;” is to state the maximum or minimum number and to determine the number of iterations. The right  “….. ;” is to state the formula of looping, can be plus or minus.   Here is the code that I add to Apps Script to create number 1 to 4 in cell E4 to E7   for ( var i = 0 ; i < 4 ; i ++  ){      activeSheet . getRange ( i + 4 , 5 ). setValue ( i + 1 );                }   i = 0; it means the initial number of the variable i is 0. i < 4; it means the variable i can’t equal or more than 4. i++; it means in

Create Your First Code in Apps Script

Image
Hello everyone, In this article we will try to make a code in Apps Script to get data or value from a cell in Google Sheets and store it in another cell. Apps Script is a coding platform in G Suite that can be used to build simple applications on top of existing apps such as Sheets, Docs, Forms, etc. With Apps Script, you only need a browser and a google account to start scripting. Apps Script allows you to extend and manipulate Google apps like Drive, Sheets, Docs, and Gmail, so you can run the process the way you want.  Create Apps Script File in Your Google Drive Open your google drive account. Right click > More > Google Apps Script. If there is no Google Apps Script, select Connect more apps and search for Google Apps Script. Open your Google Apps Script. At the top of the page, you can rename your Apps Script File. The name of your script file at the top of the page You can rename your script file Create a Google Sheets File in your G Drive and open it. Set B1 Cell as a dat

Create Your First Google Sheets

Image
   Hello everyone, Assalamualaikum  In this article I will explain how to create a new file in Google Sheets. Google Sheets is an online spreadsheet application that allows you to create and format spreadsheets and work with other people. Spreadsheet file storage using the cloud from Google Drive. Creating a Google Drive Account For the first step I suggest you create a Google Drive account. The account can be created for free and gets a free storage capacity of 15 GB. Your google drive account is like a media that will contain online documents, photos, videos. To make it you can go to the page drive.google.com.  The display of signing in to google drive via drive.google.com The display after logging in to google drive Creating a New Sheet When you are logged into google drive, you will see an interface that I think is quite easy to understand. In the upper right corner is your account, in the upper center contains a search engine and in the left contains folders by type. For the files

Create Simple Data Entry in Google Sheets

Image
  Bismillah, Assalamualaikum, Hello everyone, in this article I will discuss how to make simple data entry in Google Sheets. Data Entry is the process of entering new data into the database. In this tutorial, we will also discuss how to update and delete existing data. Creating Display Creating display interface can be done by setting the size of rows and columns, adding background color, adding table lines and setting the size and type of font. Data validation In the column to be input, data validation adjustments are made. This feature can be accessed on the Data > Data Validation. Data Validation for Date Data Validation for Email Creating a Button Creating a button can be done by Insert > Drawing. Duplication of the drawing button can be done by going to the edit mode of the button you want to copy, select the button, copy with ctrl + C, save and close, then open a new Drawing menu with Insert > Drawing, paste with ctrl + V Adjust the position of the button on the display