06-19-2012, 09:00 PM
Hi Guys
I'm trying copy data from a 2-dimensional array into an Excel sheet but the problem I'm having is how can I move to the next column of the Excel sheet using a For Loop to go through the array.
The excel sheet columns are labelled "A","B" etc, how can I move to the next column without having to write a statement for each column.
.
.
.
.
The rows are fine because they're a parameter of the For Loop but how can I parameterize the columns so I can use j to keep track of the column.
I'm trying copy data from a 2-dimensional array into an Excel sheet but the problem I'm having is how can I move to the next column of the Excel sheet using a For Loop to go through the array.
The excel sheet columns are labelled "A","B" etc, how can I move to the next column without having to write a statement for each column.
.
.
.
Code:
For i=0 to Some_value
For j= 0 to Some_value
objWorkSheet.cells(i+1, "A")=MyArray(i,j)
Next
Next
The rows are fine because they're a parameter of the For Loop but how can I parameterize the columns so I can use j to keep track of the column.