Posts: 5
Threads: 2
Joined: Sep 2024
Hi, all!
SetCell function doesn't work for me (QM v.2.4.12.2, trial version).
ExcelSheet es.Init
str variable="aaa[]bbb"
es.SetCell(variable "C3")
QM throws exception "ExcelSheet.__Range: unknown identifier" and higlights xlCellTypeConstants in "ExcelSheet.__Range" function.
Is there a fix for this?
Thanks.
Posts: 12,073
Threads: 140
Joined: Dec 2002
09-08-2024, 10:28 AM
(This post was last modified: 09-08-2024, 10:32 AM by Gintaras.)
On some computers ExcelSheet does not work. I know about this problem but can't fix it.
I recommend to use LibreAutomate instead of Quick Macros. It does not have a class like ExcelSheet, but there are alternative ways:
https://www.libreautomate.com/cookbook/R...edXML.html
https://www.libreautomate.com/cookbook/R...PPlus.html
Posts: 5
Threads: 2
Joined: Sep 2024
09-08-2024, 11:01 AM
(This post was last modified: 09-17-2024, 10:16 AM by linkiddx.)
Thanks for your quick reply, Gintaras!
Actually, some ExcelSheet functions work, for example this code runs without errors:
typelib Excel
Excel.Application a._create
Excel.Workbook b=a.Workbooks.Add()
ExcelSheet es.ws=b.Worksheets.Item(1)
es.Activate(4) ;;activate Excel
es.ws.Application.Sheets.Item(1).Name = "Object Browser"
int intWindow=win("" "XLMAIN")
max intWindow
str FilePath.expandpath("$desktop$\Object Browser.xls")
del FilePath; err
b.SaveAs(FilePath @ @ @ @ @ 1)
es.ws.Application.ActiveSheet.Range("A1").Value = "Object"
es.ws.Application.ActiveSheet.Range("B1").Value = "Member"
es.ws.Application.ActiveSheet.Range("C1").Value = "Definition"
Seems like only ExcelSheet__Range function doesn't work
I need to loop through cells and set their values using counters as cell addresses.
Is there a workaround for it, without using SetCell?
Posts: 12,073
Threads: 140
Joined: Dec 2002
int row
for row 1 5
,es.ws.Range(F"A{row}").Value = "Object"
Posts: 5
Threads: 2
Joined: Sep 2024
Solved!
QM is a superb piece of software!
Thank you, Master!!