Getting started
Your first RAS project (VS Code)
To try RAS without installing anything, the quickest way is to open the playground in your browser. This page explains how to create a RAS project using only the VS Code UI and write a macro to an Excel workbook. For the same steps on the command line, see Your first RAS project (command line).
Download
The prebuilt ras and the VS Code extension can be downloaded from Releases.
- Open the latest release
- From Assets, download the zip for your environment and the VS Code extension
ras-vscode-0.1.0.vsix, and extract the zip
| File | Contents |
|---|---|
ras-v0.1.0-windows-x64.zip |
ras.exe, ras_com.node, ras_book.node (Windows x64) |
ras-v0.1.0-windows-arm64.zip |
ras.exe, ras_com.node, ras_book.node (Windows arm64) |
ras-v0.1.0-linux-x64.zip |
ras and ras_book.node (Linux x64. For debugging without Excel and offline writing) |
ras-v0.1.0-macos-arm64.zip |
ras and ras_book.node (macOS arm64. Same as above) |
ras-vscode-0.1.0.vsix |
VS Code extension (.vsix) |
Install the extension
In the Extensions view (Ctrl+Shift+X), choose Install from VSIX… from the … menu at the top right and select the .vsix you downloaded.

Put ras (ras.exe on Windows) somewhere on your PATH, or search for ras.path in the settings (Ctrl+,) and specify its location. The extension launches ras as a language server, and ras does everything: completion, error display, debugging, and writing to the workbook.
Create a project
Choose File → Open Folder… and open an empty folder. Create RAS Project appears in the status bar; click it. (The Create RAS Project button (the RAS logo) on the folder-name row in the Explorer and "Create RAS Project" in the Command Palette (Ctrl+Shift+P) do the same thing.)

Choose the workbook to use. To create a new one, choose Create a new empty workbook; to use an existing workbook, choose Import a workbook from elsewhere… (workbooks in the folder are also listed).

Enter a name for the new workbook and press Enter (the default is the folder name).

When the project is created, src/main.ras containing a sample macro and the workbook's sheet preview open. The sample has already been written to the workbook.

| File | Contents |
|---|---|
ras.toml |
Project settings (workbook location, etc.) |
src/main.ras |
Standard module Main |
AGENTS.md |
Guide for AI agents |
myproject.xlsm |
The workbook the macros are written to |
For the full structure, see Project structure. For the "Normal" font of a new empty workbook, Excel picks the one it uses for new workbooks according to this PC's display language (Yu Gothic 11 for Japanese).
Write a macro
Rewrite src/main.ras as follows. An exported function with no arguments becomes a macro you can run from Excel's Macro dialog.
// src/main.ras
/** Writes 1 to 10 and their squares in columns A and B of Sheet 1. */
export function squares() {
for (let i = 1; i <= 10; i++) {
Sheet1.cells(i, 1).value = i;
Sheet1.cells(i, 2).value = i * i;
}
msgBox("Written");
}
When you type . as in Sheet1.cells(i, 3)., Excel members appear as suggestions. The type is shown to the right of the selected suggestion.

- Sheets are referenced by their code name (
Sheet1). - Excel members and globals are written in camelCase (
cells,value,msgBox). - How to write types and how RAS differs from TypeScript are summarized in the cheat sheet.
Find mistakes
Type checking runs as you type, and errors get a squiggly underline. They are listed in the Problems panel (Ctrl+Shift+M); click one to jump to its location. The example below calls a function squre that does not exist anywhere.

Debug
Click Debug above a function to run it. If you place a breakpoint first by clicking the left edge of a line or pressing F9 on it, execution stops there.

When execution stops at a breakpoint, the Variables view on the left shows values such as i, and the sheet preview on the right shows the sheet at that moment. Cells that changed since the last stop are highlighted with a border and listed under Changed cells. F5 (Continue) runs to the next stop, and F10 / F11 step one line at a time.

When the run finishes, the Debug Console shows the msgBox message and where the resulting workbook was saved.
![After the run finished. A1:B10 of the sheet preview shows 1 to 10 and their squares. The Debug Console shows [MsgBox] Written](../../files/docs/site/images/vscode/debug-finished.png)
Where debugging runs depends on your environment (see Debugging for details).
- Windows: It opens the workbook in the real Excel and runs there (using the bundled
ras_com.node). - Mac, Linux, and Windows without Excel: It loads the workbook into the Excel stand-in and runs there. The original workbook is not modified; the changed workbook is saved in
build/debug/workbooks/. The screenshots above are from this mode.
On Windows, Run in Excel also appears above functions. It syncs to the workbook and then runs the macro in Excel.
Write to the workbook
On Windows, when the workbook is open in Excel, every time you save a .ras file the change is applied automatically to the open workbook. RAS: workbook name in the status bar shows the sync state. If the workbook is not open, you can open it and sync with Open in Excel in the status bar ("RAS: Open in Excel" in the Command Palette).
When the workbook is not open (including on Mac and Linux), the Sync with Workbook button on the folder-name row in the Explorer ("RAS: Sync with Workbook" in the Command Palette) writes directly to the workbook file without launching Excel.

After writing, open the workbook in Excel and run squares from Developer → Macros. On Windows you can also choose a macro from the list with "RAS: Run Macro" in the Command Palette and run it in Excel. If a module was edited in the VBE on the Excel side, you are asked whether to overwrite it (Syncing with Excel).
What to read next
- Cheat sheet: syntax and Excel operations
- VS Code extension: commands, settings, sheet preview, designer
- Debugging: breakpoints,
launch.json, thedebuggerstatement - User forms: the form designer and code-behind
- Sheet and workbook code: how to receive events (such as
Worksheet.Change) - Testing:
test/*.test.rastests - RAS standard library: Range extension methods, files, CSV, JSON