02-06-2015, 01:23 AM
Macro Macro26
;Suppose you have these values from cell A1 to A15:
;1, 2, 0, 3, 4, 0, 5, 6, 0, 7, 8, 0, 9, 10, 0
;This will print "Title Test" for every cell that has a value not equal to ZERO.
int i row
str outTitle="Title Test"
ARRAY(str) data a1
ExcelSheet es.Init("")
es.CellsToArray(data "A1:A15") ;; Get Range data from column A
for row 0 data.len; a1[]=data[0 row]
for i 0 a1.len
,if StrCompare(a1[i] "0")
,,out "a[%d] = %s --> %s" i+1 a1[i] outTitle
,else
,,out "a[%d] = %s" i+1 a1[i]