Read Excel in String Array Dynamically

Hi Everyone,

My requirement is i have excel with a single column, i need read that column and add it to array of strings

So i can retain only those column in datatable

datatablevar.default.toTable(False,arrVar)

where arrVar is array of names in the column

@ppr @Palaniyappan @Yoichi

thanks in advance

Some parts from description are unclear

arrVals = YourDtVar.AsEnumerable.Select(function (x) x(colnameorindex).ToString.trim).Distinct().toArray

@ppr thankyou it worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.