Tag: lua

我如何读取luacom的xlsx文件?

我有以下代码 excel = luacom.CreateObject("Excel.Application") pcall(excel.Open, excel, "1.xlsx") if excel ~= nil then sheets = excel.Worksheets sheet1 = sheets:Item(1) for row=1, 30 do for col=1, 30 do local cellValue = sheet1.Cells(row, col).Value2 if cellValue ~= nil then –print(cellValue) end end end end 我怎样才能修改它,以便能够读取excel文件,导致目前excelvariables没有任何workhett,似乎像加载没有顺利。

使用Luacom在Excel中更改单元格边框

我在Excel中有一个单元格的范围,我需要确保显示所有边框。 到目前为止,我有: oExcel = luacom.GetObject("Excel.Application"); Book = oExcel.Workbooks:Open(_DesktopFolder .. "\\document.xlsx"); Sheet = Book.WorkSheets(1); RangeRef = "A3:E56" local BorderList = Sheet:Range(RangeRef) BorderList:Select(); 我知道下一部分是这样的: BorderList.Borders(xlEdgeLeft).LineStyle(xlContinuous) 但我似乎无法得到它的工作。 我收到一个错误,说“错误:”这真的很有帮助:P 任何人都有这方面的信息? 谢谢

如何在Lua中读取和parsingexcel文件?

我想读取一个xls文件,然后parsing它。 我怎样才能做到这一点与Lua? 谢谢。

Lua WinAPI – 从Microsoft Excel读取单元格

我正在尝试从正在运行的Excel 2007文档的单元格中读取值。 我正在使用Lua的WinAPI扩展 。 我目前正在Windows XP电脑上运行(如果有的话,但似乎WinAPI从XP工作。 这是我的Excel文档: 这是我的Lua代码: require 'winapi' w = winapi.find_window_match('Book1') — Specify the name of the window w:show() — Set the visability w:set_foreground() — Bring this window to the foreground handle = w:get_handle() — Get window handle t = {} — Create a table w:enum_children(function(w) table.insert(t,w) end) — Enumerate all children for […]

使用Lua与Excel一起工作

我打算学习我的桌面脚本需求的Lua。 我想知道是否有任何文档可用,以及标准库中是否有所需的东西。