NLua icon indicating copy to clipboard operation
NLua copied to clipboard

Using com.lua

Open htek69 opened this issue 8 years ago • 0 comments

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.

htek69 avatar Jan 03 '18 06:01 htek69