Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Refer to Excel Cell or Range Directly
#1
Greetings,

2 Requirements please:
1) I need to directly refer to a particular excel cell by its reference like A1, B45 etc.
2) How do I obtain the row number of the activecell?
I know how to do this in VBA; kindly advise how to go about this in QM

Thanks,
Philip
Best Regards,
Philip
#2
Macro Macro2462
Code:
Copy      Help
ExcelSheet es.Init
;1) I need to directly refer to a particular excel cell by its reference like A1, B45 etc.
es.SelectCell("C5")
;2) How do I obtain the row number of the activecell?
int c r
es.GetRangeInfo("<sel>" c r)
out F"{c} {r}"
#3
Thanks Gintaras,

So, once I obtian the c and r then can I refer to "R4" as shown below, where r=4

Macro Incentive Figures
Code:
Copy      Help
,es.Cell("R" r)
Best Regards,
Philip
#4
Or should it be:
Macro Incentive Figures
Code:
Copy      Help
,es.GetRangeInfo("<sel>" c r)
,str range.from("R",r)
,es.SelectCell(range)
,es.CellsToArray(name "sel")
Best Regards,
Philip
#5
Also if c is of type int then how do I get values of this cell by refering to it from and at a later point.
Best Regards,
Philip
#6
Is the below code correct:

Macro Incentive Figures
Code:
Copy      Help
,es.GetRangeInfo("<sel>" c r)
,range1.from(c,r)
,range2.from("R",r)
,es.SelectCell(range2)
,es.CellsToArray(name "sel")
,es.SelectCell(range1)
,es.CellsToArray(figure "sel")
Best Regards,
Philip


Forum Jump:


Users browsing this thread: 1 Guest(s)