Repeated tasks can slow down your efficiency but with Office Scripts in Excel for the web, you can automate your day-today tasks. In just a few simple steps, you can easily create a script and then share with your coworkers to automate your organization’s workflow. While you can use Office Scripts to be more productive at work, we’d like to show how you can use Office Scripts for fun!
To demonstrate the breadth and depth Office Scripts offers (and just for fun), we built a Game of Life simulator. The Game of Life, also known simply as “Life,” is a cellular automaton devised by 1970’s British mathematician, John Horton Conway. It is a zero player game, meaning that its evolution is determined by its initial state, requiring no further input. You simply create, sit back, and watch the evolution unfold.
17c/45_Reaction, 16x5 (17c45reaction.rle)
Here are the steps to create your own zero-player game:
Create a new workbook in Excel on the Web.
Open the “Automate” tab.
Press the "New script" button.
Copy the code from game-of-life.ts and paste into the Code Editor (optionally, rename the script as "Conway's Game of Life”).
Hit the “Run” button above the code editor.
After a few seconds of churning (downloading the pattern rule and setting up the game board), a small "glider" will come to life and start to travel across the worksheet.
Below are some examples of different Game of Life patterns - note the frame rates have been adjusted for demonstration purposes.