Excel JavaScript

Automating Excel with TypeScript – Complete Guide to Office Scripts

Office Scripts TypeScript for Excel Online: variables, loops, conditions, tables. Goodbye VBA macros, welcome TypeScript.

Course description

The Future of Excel Macros Is Written in TypeScript

VBA macros are a thing of the past. Office Scripts is Microsoft's modern answer: automations for Excel Online written in TypeScript, runnable in the browser, shareable with your team and integrable with Power Automate. In this course you'll learn the fundamentals of Office Scripts by building progressively more complex scripts on real data.

What You'll Learn in 6 Lessons

  • let variables in TypeScript: how to declare and use variables to make scripts dynamic and readable
  • getWorksheet and getCell: accessing the active sheet and reading/writing cell values with TypeScript
  • if/else conditional blocks: checking cell values and reacting differently based on conditions
  • while loop: iterating over cells and ranges dynamically, handling variable-length data
  • for loop: processing data series in an orderly way across rows and columns
  • Structured tables: reading rows, accessing columns and counting records in Excel tables

Who This Course Is For

For those who use Excel Online with Microsoft 365 and want to automate repetitive operations without relying on VBA. A basic knowledge of TypeScript or JavaScript helps but is not required: the scripts are simple and explained step by step. The level is intermediate.

Lessons list

Office Scripts in Excel con TypeScript: crea il primo script Hello World, capisci workbook, worksheet e main, poi scrivi un valore nella cella A1. Cosa imparerai in questo video: - Dove trovare la scheda Automatizza e l'...

Guarda lezione

I'll show you how to declare and use let variables in TypeScript within Office Scripts to make your Excel automations dynamic, readable, and reusable — with hands-on examples on real data.

Guarda lezione

I'll explain how to access the active worksheet with getWorksheet and read or write cell values using getCell — the fundamental operations of any Office Script written in TypeScript.

Guarda lezione

Let's explore how to use if/else blocks inside Office Scripts to evaluate cell values and trigger different actions based on conditions — enabling smarter Excel automations.

Guarda lezione

I'll show you how to use a while loop to scroll through rows and columns dynamically in Office Scripts, handling variable-length data and avoiding infinite loops.

Guarda lezione

Let's learn how to use the for loop in Office Scripts TypeScript to process data series across rows and columns in an orderly way, paying close attention to correct indexing.

Guarda lezione

In this lesson I'll work with structured Excel tables in Office Scripts: I'll read rows, access columns by name, and calculate the number of active records.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 7
  • Duration 1h 14m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed