Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Excel + GetCell
#2
Macro Macro1620
Code:
Copy      Help
ExcelSheet es.Init("sheet1" 1|8|16 "D:\userdata\teste\Desktop\teste1.xls")
err goto [PREPARATION]

int r c nr nc ;;row, column, num rows, num cols
nr=es.NumRows(nc) ;;get number of rows and cols
ARRAY(str) a.createlb(nc 1) ;;cells of a row
str s ;;result
for r 1 nr+1 ;;for each row
,for(c 1 nc+1) es.GetCell(a[c] c r) ;;get cells of this row
,YourFunction r a s ;;pass a to your function, and let it store result in s
,es.SetCell(s nc+1 r) ;;set cell at the end of the row

function example
Function YourFunction
Code:
Copy      Help
function row ARRAY(str)&a str&s

out "--- row %i ---" row
s=""
int c
for c 1 a.ubound+1
,out a[c]
,s+a[c]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)