Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterize Excel Columns for 2-Dimensional Array
#1
Solved: 10 Years, 9 Months, 1 Week ago
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.
.
.
.
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.
Reply


Messages In This Thread
Parameterize Excel Columns for 2-Dimensional Array - by defcon3 - 06-19-2012, 09:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Identify and Count the columns in the datatable Bhuvana 0 831 12-20-2019, 11:15 PM
Last Post: Bhuvana
  How To Capture Array Value into Excel Worksheet? Studymode 0 1,312 01-09-2018, 08:37 AM
Last Post: Studymode
  parameterize Excel Sheet Name in SQL bjitsidhu 0 2,741 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  Comparing two excel Sheets whose columns names vary Divya Roopa 2 8,292 03-26-2014, 07:20 PM
Last Post: Parke
  sort two dimensional array. venkatesh9032 0 1,744 03-06-2014, 02:47 PM
Last Post: venkatesh9032

Forum Jump:


Users browsing this thread: 1 Guest(s)