How to store drop down values and write it on excel

datatable
excel
studio

#1

can anyone tell me that how to store the drop down values which we got selected and write it on excel.


#2

You can use the Get Attribute activity to extract the values from the drop down menu and then save them to Excel using any Write activities.


#3


am getting error like this.


#4

Try assigning a string value to the output.

Thanks,
Rammohan B.


#5

First, the variable A should be a string value.

Then, when using the Get Attribute activity, you need to give it a proper argument. In this case, instead of “INDIA”, you should type in the name of an attribute that will return “INDIA”.

Try “aaname” instead as a guess, but you will need to see in UI Explorer for the exact attribute that contains your wanted value.


#6

@REKHASRPF, @Rammohan91

Can we try like this…
1.Use Get Attribute Activity, there give the attribute items.
2.Then Assign List(String) in the result.
3.Then Write those values in Excel.

Regards,
Mahesh


#7

i checked in UIexplorer also, the “aaname” for drop down item INDIA is ‘INDIA’
But am getting null, when i used to see the result in a message box.


#8

@REKHASRPF

Exactly, you need to type:
aaname
into the Get Attribute box to get ‘INDIA’ as the attribute value :slight_smile:


#9

aaname for India is ‘INDIA’ only thats why i typed as “INDIA” into the attribute field.
am not getting whats wrong am doing here.


#10

can anyone help me to resolve this ??


#11

To get the value ‘INDIA’, this is how the Get Attribute activity needs to be set up:
image


#12

it is not writing any value on excelsheet.


#13

is there any alternative method to get drop down values ?


#14

Could you do Log message activity with the value of your variable ‘A.ToString’ right after the Get Attribute activity?
It might help debugging the issue to see what the value is at that point. It really should get the attribute value, unless the selectors are a bit off.


#15

Hi @REKHASRPF - Try this, I find the children of DropDown by FindChildren activity and then applied for each loop for children. In for each I have used get Attribute acvtivity and passed the selector for each children found -

Main.xaml (7.8 KB)

Or alternatively open UI explorer search your dropdown and get the attribute aaname then perform some string manpulations on it like this -

Main.xaml (7.7 KB)