I guess the excel file you are using here was opened and same I can see it in Task bar. Could you please close the excel file and then try once.
try this
DataView view = new DataView(table)
DataTable distinctValues = view.ToTable(true, "Column1", "Column2" ...)
Thanks
Ashwin S
it is not a problem because when i give index 0 it works but when i gave index 1 only it doesnt work
… anyways i solved it now it is working thank you
1 Like
thsnk you