[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luacom and excel
- From: David Manura <dm.gmane@...>
- Date: Sat, 12 Aug 2006 03:48:31 +0000 (UTC)
Does anyone know why the last line here fails?
-- test.lua
require('luacom')
excel = luacom.CreateObject("Excel.Application")
excel.Visible = true
wb = excel.Workbooks:Add()
ws = wb.Worksheets(1)
ws.Cells(1,1).Value = "test"
COM exception:(.\src\library\tLuaCOM.cpp,398):Type mismatch.
stack traceback:
[C]: ?
stdin:1: in main chunk
[C]: ?
It works fine in JavaScript (cscript.exe):
// test.js
excel = WScript.CreateObject("Excel.Application");
excel.Visible = true;
wb = excel.Workbooks.Add();
ws = wb.Worksheets(1);
ws.Cells(1,1).Value = "test";
I tried this with luacom 1.3 in Lua 5.0.2 since luacom is slightly broken in Lua
5.1 as noted here: http://lua-users.org/lists/lua-l/2006-02/msg00571.html
--davidm