Create an Array List and populate it with a known Cell Range from Excel

Create an Array List and populate it with a known Cell Range from Excel

cencinaNB2ET
Advocate Advocate
924 Views
1 Reply
Message 1 of 2

Create an Array List and populate it with a known Cell Range from Excel

cencinaNB2ET
Advocate
Advocate

My question is Simple.

 

I need to create an unknown sized array-list ( integers,string...etc) and populate it with a known number of cell range i extracted from an excel document.

I dont want the array list to be seen as a user paramter hence why i dont want to use:

MultiValue.List("d0") = GoExcel.CellValues("filename.xls", "Sheet1", "A2", "A10")

 But rather an adaptive array list that can change its size... 

 

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

cencinaNB2ET
Advocate
Advocate
Accepted solution

Yes Sorry it was very simple:

 

SyntaxEditor Code Snippet

Dim Reference_File As String

Reference_File= "E:\Engineering Projects\Project A\Excel Control\Purchased Components.xlsm"

Dim Row_Start As Integer = 41
Dim Row_End As Integer = 55


Dim Array As New ArrayList 
Array = GoExcel.CellValues(Reference_File, "S Series", "B" & Row_Start  ,  "B" & Row_End)



MessageBox.Show(Array.item(3), "Title")  
0 Likes