Saturday, September 8, 2018

Google Docs-Google Sheet-How to record macros

How to record a macro in Google Sheet

Google has recently added to their Google Sheet, macro recording facility.Therefore it allows to users to record macros.These macros are recorded using google scripts.As well as Microsoft Excel,users can edit their recorded macros according to their own needs.
Please follow below steps to record and edit recorded macros.

Step One -
To record new macro go to tools then select Macros from the drop down menu,after that select Record macro from the sub menu,below image will show you the way of doing this.

Pic 01
Step 02 -
Once you click on the "Record Macro " then it starts to record your work.Once your work finished click on the save button then your work is recorded.This step has clearly shown in the below image.Then the next challenge is to run the recorded macro

Pic 02
Then give a name for your recorded macro to save.


Step 03 -
To run the recorded macro,again go to the tools >>> macros, then select recorded macro by saved name.Once select the desired macro it will run for you.See below image.

Pic 03

Sunday, September 2, 2018

Send emails from Google Sheet

Send emails from Google Sheet

Aim

This Blog post explains you how to send emails from Google Sheet.

Step 01
Open New Google Sheet as shown in the Pic 01.
Pic 01

Step 02

You have to enter sample data to your spread sheet to test our process.Therefore design your spread sheet as shown in the Pic 02.


Pic 02
Step 03

Open script editor by clicking tools menu >> Script editor.
Then you have to type small coding part in script editor.It looks like Pic 03.Please see below image.

Pic 03

Code is as follows;

function sendEmails2() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2; // First row of data to process
  var numRows = 2; // Number of rows to process
  // Fetch the range of cells A2:B3
  var dataRange = sheet.getRange(startRow, 1, numRows, 3);
  // Fetch values for each row in the Range.
  var data = dataRange.getValues();
  for (var i = 0; i < data.length; ++i) {
    var row = data[i];
    var emailAddress = row[0]; // First column
    var message = row[1]; // Second column
    var emailSent = row[2]; // Third column
    if (emailSent != EMAIL_SENT) { // Prevents sending duplicates
      var subject = 'Sending emails from a Spreadsheet';
      MailApp.sendEmail(emailAddress, subject, message);
      sheet.getRange(startRow + i, 3).setValue(EMAIL_SENT);
      // Make sure the cell is updated right away in case the script is interrupted
      SpreadsheetApp.flush();
    }
  }
}


Then to test this one run your scriptTo run script,follow the below image (Pic03)





Saturday, September 1, 2018

Working with Google Sheet

Working with Google Sheet

Google Sheet is somewhat similar to Microsoft Excel Spread Sheet.Google sheet can be used do perform calculations as well as Ms Excel.So from this blog post, I am going to give you a basic understanding about Google Spread Sheet Development for you day today activities.
First of all to get google sheet you should have to create a google account and then you can access to google drive with your existing account or a newly created one.

Pic 01

From your gmail account or Google Account you can access to the google drive.Pic 01 has pointed out the way you can choose google drive through your gmail .account.

Pic 02
As explain from Pic 02,Click on the New then you can get a menu select Google Sheet from it,this will give you a anther sub menu select "Blank Spreadsheet" from it.

Then New empty spreadsheet will create for you.Look at the Pic 03,it is the newly created spread sheet according to our example.To rename this spreadsheet as you need,it is required to double click on the" Untitled Spreadsheet".Following image has clearly explained this process for you.

Pic 03
You can rename your spreadsheet by double clicking on the "Sheet1",and if you want to add additional sheets click on the (+) sign then it will ad you more sheet for you.Please look at the Pic 04 for more details.

This is a initial lesson on google spread sheet development.Get in touch with my blog to learn more lessons about google spreadshee.t.If you have anything to make clear please make a comment below.

Google Docs-Google Sheet-How to record macros

How to record a macro in Google Sheet Google has recently added to their Google Sheet, macro recording facility.Therefore it allows to u...