How to convert a System.Object [] into an array

0

I am extracting from an excel file the value of a range of cells and I want to put it in an array and then select each data as I am interested. The problem is that it gives me an error telling me that it is not possible to convert a System.Object[,] at System.Array() .

Let's see if it is possible that someone can help me. I have the following:

Dim rango As Array()
ExcApp = New Excel.Application
wBook = ExcApp.Workbooks.Open(laruta) 
wSheet = wBook.Worksheets("Hoja1")
rango = wSheet.Range("A" & TextBox3.Text & ":A" & TextBox4.Text).Value
total = TextBox4.Text - TextBox3.Text
While contador < total   
    TextBox.Text = ""
    TextBox.Text = rango.GetValue(i)
    
asked by som1995 10.04.2017 в 13:19
source

1 answer

0

I think about the whole topic of arrays as

Dim rango() as string

This is what always works for me, although there are people who also work for him

Dim rango as string()

And then if I need to access a specific data I put it as

rango(1)
    
answered by 10.04.2017 в 15:35