Posts

Showing posts from March, 2022

How to Import PayPal Transactions into Google Sheets

Image
This tutorial will show you how to import PayPal transactions into Google Sheets with the help of Google Apps Script. You can choose to import standard PayPal payments, recurring subscription payments, donations, or even refunds and chargebacks into Google Sheets. Once the data has been imported into Google Sheets, you can export them into a CSV file and import them into Quickbooks accounting software. Tally users in India can export PayPal transactions from Google Sheets into XML format and bulk import them into Tally. Also see: Automate PayPal with Google Forms Import PayPal Transactions in Google Sheets For this example, we will be importing the list of donors into Google Sheets who have made the donations through PayPal. 1. Create API credentials inside PayPal Sign-in to your PayPal developer dashboard ( developer.paypal.com ) and create a new app in the live mode. Give your App a name - Transaction Importer for Google Sheets and click the Create App button. PayPal wi...

How to Get the Last Row in Google Sheets when using ArrayFormula

Image
Here we have an employee list spreadsheet with a column named Employee Name and a column named Employee ID . As soon as you enter a new employee name in the Employee Name column, the Employee ID column will automatically be filled with the help of an ARRAY FORMULA provided below: = ARRAYFORMULA ( IF ( ROW ( A : A ) = 1 , "Employee ID" , IF ( NOT ( ISBLANK ( A : A ) ) , ROW ( A : A ) - 1 , "" ) ) ) The formula adds the current row number to the Employee ID column if the current row is not the first row. If the current row is the first row, then the title is added to the cell. Also see: Google Sheets Formulas for Google Forms The system works but there’s one major flaw in this approach. Let me explain: Say you have several new employees and you would like to add them to the spreadsheet programmatically with the help of Google Apps Script. You’ll get the reference of the sheet and then use the the getLastRow() method to find the last row number to...

Find and Remove Inactive Users in your Google Workspace Domain

Image
You can use Google Apps Script to find all the inactive user accounts in your Google Workspace domain. The script will find all the users that have not logged in to the domain for a period of time (say 6 months). You also have the option to delete the dormant accounts from Workspace domain and save on your monthly bills. Find the inactive users in Google Workspace domain We can use the Admin Directory service of Apps Script to list all the users (active and inactive) in a Google Workspace domain. Open a new script, go to Service section and enable the Admin Directory service. Next, go to the Google Cloud project associated with your Apps Script project. Switch to the Library section, search for Admin SDK and enable the API. The required OAuth scope is https://www.googleapis.com/auth/admin.directory.user and it should be listed in your appsscript.json file. { "timeZone" : "Asia/Kolkata" , "dependencies" : { "enabledAdvancedService...

How to Extract URLs from HYPERLINK Function in Google Sheets

The HYPERLINK formula of Google Sheets lets you insert hyperlinks into your spreadsheets. The function takes two arguments: The full URL of the link The description or the anchor text of the link The URL and anchor text can either be specified as a string or as a cell reference. If you insert a hyperlink into a cell using the HYPERLINK function, there’s no direct way to extract the URL from the formula. You may consider writing a complicated Regular Expression to match and extract the hyperlink in the cell formula or use Apps Script with Google Sheets API. const extractHyperlinksInSheet = ( ) => { const ss = SpreadsheetApp . getActiveSpreadsheet ( ) ; const sheet = SpreadsheetApp . getActiveSheet ( ) ; const hyperlinks = [ ] ; const spreadsheedId = ss . getId ( ) ; const sheetName = sheet . getName ( ) ; const getRange = ( row , col ) => { const address = sheet . getRange ( row + 1 , col + 1 ) . getA1Notation ( ) ; ...