Office Scripts(Microsoft Excel)

03/21/2023

Japanese version.

Office Scripts are programs for automating Excel; by using Office Scripts, you can automate tasks that would be too complicated to do manually. For example, if you perform the same task every day, you can save time by automating it using Office Scripts.

Office Scripts are used to manipulate Excel cells, sheets, and workbooks. For example, they can read or write values in Excel cells or change the background color of cells. It can also create, delete, and rename Excel sheets.

Office Scripts are based on a programming language called JavaScript, which is one of the easiest programming languages to learn for beginners. Like macros, it can also record operations.

Comparison between Office Script and Macro (VBA)

Ease of learning

Both languages are easy for beginners to learn, but Office Scripts is slightly superior due to its later development and sophistication; learning Office Scripts also has the advantage that learning Office Scripts will lead to learning JavaScript.

Features

Neither is superior to the other, but there are some differences as follows

Office scripts are cloud (web) compatible and can be handled in a browser.

Macros (VBA) are only available for desktop applications, but have more features and can often only be done here.

Future Prospects

Office Scripts is superior. At present, even if the functions are inferior, they are being developed additionally, and macros (VBA) have many security issues and are reluctant to develop additional functions.

Macros (VBA) have many functions that are beyond the scope of Excel, such as browser operations, and it is highly likely that such functions will not be added to Office Scripts, but will be migrated to Power Automate Desktop instead of having such functions in Excel. We will not have such functions in Excel, but will move them to Power Automate Desktop.

Articles

Script Recording and Run.

Basic operations.

Cell

Set value to cell / Get value from cell

Delete cells, rows, and columns

Clear cells, rows, and columns.

Insert cells, rows, and columns.