Excel and data table

I have opened the excel created the data table.
what i am now trying to do is get the data and use it via a variable.
but when its getting the data from the column its getting the last cell in the required column ie. its getting the last cell (C46).
Then it stops as there are no more after this rows after this.
anyone know why it isnt reading it and getting it in order?
I have ticked the keep format tick box.

Hi @WillBrown
After getting the entire data as you said

Use DataView Concept

DtView view1=New DataView(Datatable)
view1.sort=“Column Name” asc

DataView view = new DataView(table)
DataTable distinctValues = view.ToTable(true, "Column1", "Column2" ...)

Ashwin S

1 Like

Can you elaberate how i put in the code ie am i making a variable or using a type box ect,?

if possible can someone show me a screen shot?