vimsheet.scripting.engine
VimSheet scripting engine — executes a mini-DSL of spreadsheet commands.
- class vimsheet.scripting.engine.ScriptResult(commands_run=0, errors=<factory>)[source]
Bases:
objectOutcome of running a script.
- exception vimsheet.scripting.engine.ScriptError[source]
Bases:
ExceptionRaised when a script command cannot be executed.
- class vimsheet.scripting.engine.ScriptEngine(workbook=None)[source]
Bases:
objectExecute VimSheet script commands against a Workbook.
Script syntax — one command per line; lines starting with
#are comments:# Set values set A1 = Hello set B1 = 42 formula C1 = =SUM(A1:B1) # Formatting format A1 bold=true align=left # Sheet ops addsheet Sales sheet Sheet1 # File ops open data.csv save output.xlsx # Column width colwidth A 15 autofit B # Sort sort 1 asc
- Parameters:
workbook (Workbook | None)
- run_string(script)[source]
Execute all commands in script string.
- Parameters:
script (str)
- Return type: