Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetCell function doesn't work for me
#1
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.
#2
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
#3
Thanks for your quick reply, Gintaras!
Actually, some ExcelSheet function work, for example this code runs without errors:
 
Code:
Copy      Help
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?
#4
Code:
Copy      Help
int row
for row 1 5
,es.ws.Range(F"A{row}").Value = "Object"
#5
Solved!
QM is a superb piece of software!
Thank you, Master!!


Forum Jump:


Users browsing this thread: 1 Guest(s)