I want to make a script that loops through excel columns, and each time a row is done the next row is done. I managed to only get a single row finished, however for some reason the loops will not commence to row 2 until conditions are met.
I am trying to write a script similar to what I did in python. In python, with embedded for loops, I could make the embedded loop iterate to 8 before iterating the first loop once.
For a python code example:
Code: Select all
for Row in range(0, 5):
for Column in range(0, 8):
print(Row, Column)
I am trying to replicate this in the script editor, but with the absence of for loops, how do I do it?
Specifically, in Excel; I was to use the Getcell and Setcell functions created in the script editor to copy and paste between two instances of excel.
Here is my failed attempt at trying to get it to work: NOTE: The code isn't pasting correctly into the box below.
Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
XLOpen>C:\Documents and Settings\abrideau\My Documents\PracticeIn.xlsx,1,xlBookIn
XLOpen>C:\Documents and Settings\abrideau\My Documents\PracticeOut.xlsx,1,xlBookOut
XLGetSheetDims>xlBookIn,Sheet1,nRowCount,nColCount
Let>XColVal=2
Let>XRowVal=1
While>XRowVal<5>XRowVal=XRowVal+1
XLGetCell>xlBookIn,Sheet1,XRowVal,XColVal,strCell
XLSetCell>xlBookOut,Sheet1,XRowVal,XColVal,strCell,scResult
EndWhile
While>XColVal<8>XRowVal=2
Let>XColVal=XColVal+1
XLGetCell>xlBookIn,Sheet1,XRowVal,XColVal,strCell
XLSetCell>xlBookOut,Sheet1,XRowVal,XColVal,strCell,scResult
EndWhile
Thanks.