Looping through Excel Columns through iLogic

Looping through Excel Columns through iLogic

ABoaro
Enthusiast Enthusiast
913 Views
1 Reply
Message 1 of 2

Looping through Excel Columns through iLogic

ABoaro
Enthusiast
Enthusiast

I am still working on learning the ins and outs of basic iLogic. I can loop through rows just fine within iLogic itself because they are numbers. However, I am trying to figure out a way with columns instead.

 

I have the idea of making an ArrayList holding strings of capitalized variables and looping through the ArrayList.

 

Something like this

 

For Each oCharStr in ColumnArrayList

          'Do something

Next

 

I am fearful that it may just deal with the numerical values correlated to the letters rather than the Letter itself. Anyone have any tips on how to do something like this? If there is an easier way then I am all ears.

0 Likes
Accepted solutions (1)
914 Views
1 Reply
Reply (1)
Message 2 of 2

ckeveryga
Advocate
Advocate
Accepted solution

Are you reading off of an actual excel sheet (more of the code might be helpful)? If so, the logic should be the same as reading an excel sheet using VB.NET. You can loop through rows and columns like so,

For i = 1 To intFinalRow
	For j = 1 To intFinalCol
		strCell = xlWs.Cells(i,j).Value
	Next
Next

Where i represents the row and j represents the column. 

0 Likes