RAS Playground 日本語 GitHub

Run, test and debug

Running without Excel

On Mac, Linux, Windows without Excel, CI, and in work done by AI agents, ras alone lets you go around the "write → run → verify" loop. None of it starts Excel: execution runs against the Excel stand-in (spec §14.10.8; the same as VS Code's debug run without Excel), which loads the workbook from ras.toml, and the original workbook is not modified.

ras run

ras run --list                                        # list the functions that can be run
ras run Report.rebuildReport                          # run one (the module name can be omitted if it is unambiguous)
ras run ask --msgbox vbYes --inputbox "2026/4"        # give dialog responses, in the order they are shown
ras run Report.rebuildReport --json                   # print the result as JSON
ras run Report.rebuildReport --view                   # also make an HTML that shows the workbook after the run as a grid

It shows the output of debug.print, the dialogs shown and their responses, and any run-time error (VBA error number, description, and the position in the .ras), followed by the changed cells. The changed workbook is saved in build/debug/workbooks/.

rows 3
Changed cells (Book.xlsx → build/debug/workbooks/Book.xlsx):
Sheet1:
  D2	(empty) → 6
  D3	(empty) → 10
  D4	(empty) → 4
3 differences (structure 0, cells 3, names 0)

Excel stand-in

Instead of Excel, it loads the workbook file and reads and writes its cells. ras run, ras test, the playground and VS Code's debug run without Excel all use the same thing.

You can check before running whether the APIs you use exist in the stand-in.

ras check --target stand-in               # warns about members the stand-in lacks (W0510), operations that need Excel (W0511), COM objects that cannot be created (W0512), formats not saved in the workbook (W0513) and argument values it does not support (W0514)

Writing stand-in = true under [lint] in ras.toml makes it always warn. The list of supported members is in §14.10.8 of the language specification.

The optimizations of the VBA build (bulk transfer, inlining and so on) are not applied, so timing and speed differ from the real thing. Differences from real Excel, such as the precision of long / currency / decimal and unsupported VBA standard functions, are summarized in §14.10.5.