NLua
NLua copied to clipboard
Using com.lua
I'd like to control Excel by below Lua script. I use CLRPackage.lua and com.lua in "Samples" directory.
--
require("CLRPackage") require("com") excel = com.CreateObject("Excel.Application") test = excel.Visible excel.Visible = true local book = excel.Workbooks:Add() local sheet = book.Worksheets(1) sheet.Cells(1, 1).Value2 = 99 local val = sheet:Range('A1'):Value() print(val)
--
After I modified line45 in com.lua as follows, Excel was appeared. T:InvokeMember(key,put_flags,nil,obj,A{value})
But I encountered error "unknown member name InvokeMember" when the "local book = excel.Workbooks.Add()" was executed.
Does anyone have solution for it?
I would appreciate your help.
Thank you.