Skip to content

Commit e383f8f

Browse files
authored
Update README.md
1 parent 7431fc0 commit e383f8f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
# ExcelScript
22
Roslyn-based Excel AddIn that allows to write, compile, and run C# code right in Excel using simple user-defined functions
33

4+
Aside from doing simple immediate evaluations, some of the core features are:
5+
6+
- You can create re-usable scripts on the fly in your worksheets, which will be stored in an in-memory cache with a used-defined string key.
7+
- You can then invoke that script using its key anywhere as often as you like
8+
- You can define and pass parameters to your scripts, so they can be invoked with arguments
9+
- You can create the parameter definitions & script manually, or just parse a function and have the AddIn extract and generate all necessary handles automatically
10+
- You can even register your script, meaning the AddIn will register a User Defined function with the name and all parameters you defined to invoke your script
11+
- A helper function lets you format & syntax highlight your C#-code in Excel
12+
- You can serialize/deserialize your scripts to strings or files
13+
14+
Some bonus features:
15+
16+
- You can debug your scripts. To do so, try the following:
17+
1. Open the addin and the Example.xlsm
18+
2. Attach the debugger of your choice to the Excel.exe process (e.g. open Visual Studio -> Debug -> Attach to Process -> Excel)
19+
3. In any script, e.g. lets say on Sheet "Parse" in cell B18, enter "System.Diagnostics.Debugger.Break();"
20+
4. When this script is run, your debugger should behave as expected; break execution, show the code, show local variables, etc.
21+
- The library supports execution in different AppDomains. By default, a script will run in a shared appdomain between all other scripts; you could also pass in an option to run in a shared appdomain with the main addin (ExcelDna's default domain), or to create a seperate appdomain for that script.
22+
- By default, all functions are marked non-volatile because. Unfortunately, that means that after opening a workbook, you need to refresh each formula that creates a script by hand or macro. ExcelScript offers an experimental way around this, though:
23+
1. Open The ExcelScript-AddIn.xll.config
24+
2. set TagDirtyMethodCalls to true
25+
3. This will mark each cell creating a handle (script, parameter and so on) to dirty once. Could be particularly useful in manual calculation mode (in auto calculation mode, all scripts would run on the next recalculation, so not very useful).
26+
427
Project includes an exemplary Excel-file to demonstrate usage. Please see the Wiki on Github for further guidelines.

0 commit comments

Comments
 (0)