lua-users home
lua-l archive

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


Fabio Mascarenhas <mascarenhas <at> gmail.com> writes:
> Try wb:Worksheets(1) and ws:Cells(1,1).Value. LuaCOM follows the Lua
> convention for method calls.

That seems worse:

>   ws = wb:Worksheets(1)
COM error:(.\src\library\tLuaCOM.cpp,403):Invalid number of parameters.
stack traceback:
        [C]: in function `Worksheets'
        stdin:1: in main chunk
        [C]: ?

> ws:Cells(1,1).Value = "Test"
COM error:(.\src\library\tLuaCOM.cpp,403):Invalid number of parameters.
stack traceback:
        [C]: in function `Cells'
        stdin:1: in main chunk
        [C]: ?

Note that the following does work:

  print(ws.Cells(1,1):Value())  -- prints value in cell

but this does not:

  ws.Cells(1,1).Value = "test"  -- type mismatch

Passing the original value doesn't work either:

  ws.Cells(1,1).Value = ws.Cells(1,1):Value()  -- type mismatch

--davidm