lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi All,

XLLua [1] is a framework for writing excel user-defined functions in Lua.

A hello world addin script can be as simple as:

    local function myfunc( args )
        return "Hello World!"

    xllua.reg_fun( "MyFunc", myfunc )

This will register a function with Excel that can be called as '=MyFunc()' in a worksheet.

How to use it:
1. Download the XLL from [2] and save to a folder
2. In the same folder create a lua script with the same name but with .lua extension (eg. XLLua-0.0.1.lua)
3. Start Excel and go to Tools -> Addins
4. Browse for and select the XLL.
5. Click ok.

More details can be found at the github site [1].