harsha1123
(Harshavardhan Reddy)
October 9, 2019, 3:18pm
1
Hey guys,
Need a quick help,
I have a drop down in my excel sheet like this
From this i have to get all the values and select one by one by looping.
Any quick suggestions or approaches or code is also😜 appreciated. I’ll try to upload sample excel sheet ASAP.
1 Like
Hi,
I believe that the dropdown items are the ones that are present in that particular column of excel. You can fetch all the values of that column and remove duplicates which would then give you the list which is same as dropdown items.
allurai_india
((Allu)Alluraiah Yallapragada)
October 9, 2019, 3:55pm
3
Hi
Are these drop downs …from Named range ?
AshwinS2
(Ashwin S)
October 9, 2019, 4:42pm
4
Hi @harsha1123
Use datatable.select(“[Gross Margin]<>‘’”).CopyToDatatable()
(or)
DataView view = new DataView(table)
DataTable distinctValues = view.ToTable(true, "Column1", "Column2" ...)
or
DataTable =DataTable.DefaultView.ToTable(true)
Thanks
ashwin S
ppr
(Peter Preuss)
October 9, 2019, 5:39pm
5
@harsha1123
Named Range usage is a good approach
Find children Activity is another Option for this use case
allurai_india
((Allu)Alluraiah Yallapragada)
October 10, 2019, 6:30am
6
Hi
go to “formula” tab in exel. and see if the any Named ranges are there .
if you have Named range eg. “GrossMargin” . you may use following …
From row In Gross_list.Select Select Convert.ToString(row(*GrossMargin"))).ToArray().
harsha1123
(Harshavardhan Reddy)
October 10, 2019, 12:25pm
7
Thank you @Vijay_chandran for the prompt reply i have solved this.
Cheers!
1 Like
system
(system)
Closed
October 13, 2019, 12:25pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.