How to retrieve all data from Dropdown and paste it into excel without duplicates.
You can try the below,
-
Find Children - Get all the options in the dropdown as a string collection
-
Build
DataTable
with one column -dt_Output
-
Just find the distinct values from it & convert to datatable -
strListValuses.Distinct().Select(Function(obj) dt_Output.Rows.Add({ obj })).CopyToDataTable
-
Write Range - To write the
DataTable
into the Excel
Hope this helps.
Thanks
#nK