Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[question] If counter 0
#1
Macro Macro17
Code:
Copy      Help
int row
str outTitle = "TitleTEST"
ExcelSheet  Excel_Title.Init("")
,,,Excel_Title.Activate
,,,Excel_Title.GetRangeInfo("<sel>" 0 row)
,,,Excel_Title.SelectCell(1 row+1)
str mSubject=Excel_Title.Cell("<sel>" 0 row)

int number = 10

if (!empty(mSubject))
,out outTitle

1. for example : input "int number=10"
2. output: "outTitle" instruction works -> -1(int number)
3. finally counter : "0"
4. "outTitle" instruction dosen't work

This command works as long as possible the number counter?
What should I do if possible?
#2
Macro Macro26
Code:
Copy      Help
;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]
#3
Thank you. I got a lot of help to you. Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)