1
Je code suivantComment lire un fichier xlsx avec luacom?
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
Comment puis-je modifier afin de pouvoir lire le fichier excel, faire tenir Excel actuellement variable ne pas workshett et seemd comme le chargement n'a pas bien passé.