This post has been republished via RSS; it originally appeared at: Excel Blog articles.
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.
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.
To learn more about Office Scripts and Game of Life:
-
Check out the basic scripts for Office Scripts
-
Review the Game of Life rules
-
See more Office Scripts samples and real-world scenarios
-
View the Office Scripts video tutorials by Sudhi Ramamurthy, a PM on our team
-
Visit Stack Overflow to ask any coding related questions - use the [office-scripts] tag
We’d love to hear from you and look forward to seeing how you use Office Scripts in your workflows. Happy scripting!