Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a value in Excel
#2
Code:
Copy      Help
str s="33" ;;search for "33"

ExcelSheet es.Init
ARRAY(str) a
int sheet row col found
int nsheets=es.ws.Application.Worksheets.Count
for(sheet 1 nsheets+1)
,es.Init(sheet)
,es.GetCells(a)
,for row 0 a.len(2)
,,for col 0 a.len(1)
,,,;out a[col row]
,,,if(a[col row]=s) found=1; goto g1
;g1
if(!found) mes "not found"; ret
mes "sheet %i, row %i, column %c" "" "i" sheet row+1 'A'+col

act "Excel"
es.ws.Activate
Excel.Range cell=es.ws.Cells.Item(row+1 col+1)
cell.Select

Works with QM 2.1.7 and later.


Messages In This Thread

Forum Jump:


Users browsing this thread: 26 Guest(s)