Posts: 166
	Threads: 57
	Joined: Aug 2013
	
	
 
	
	
		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
	
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Macro 
Macro2462 
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}"
 
 
	
	
	
		
	Posts: 166
	Threads: 57
	Joined: Aug 2013
	
	
 
	
	
		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 
	
Best Regards,
Philip
	
	
 
 
	
	
	
		
	Posts: 166
	Threads: 57
	Joined: Aug 2013
	
	
 
	
	
		Or should it be:
Macro 
Incentive Figures 
,es.GetRangeInfo("<sel>" c r)
,str range.from("R",r)
,es.SelectCell(range)
,es.CellsToArray(name "sel")
Best Regards,
Philip
	
	
 
 
	
	
	
		
	Posts: 166
	Threads: 57
	Joined: Aug 2013
	
	
 
	
	
		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
	
	
 
 
	
	
	
		
	Posts: 166
	Threads: 57
	Joined: Aug 2013
	
	
 
	
	
		Is the below code correct:
Macro 
Incentive Figures 
,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