Uipath How To Write Dictionary(String,Object) Variable Type To Excel Or Write Line

Hi guys,

I would want to try dictionary(string,object) variable type from input to write line activity on uipath.When ı try to do that thing , it gives error like as below ;

image

My Data From Excel ;

image

My Workflow;
Active_Directory.xaml (15.7 KB)

Thanks for answers,

Best regards

If you have your dictionary as (string, object) then you have to explicitly define how it handles the value because it could hold anything (a string, an int, a datatable, etc). ie myDict(“some key”).ToString - assuming that’s the type of value it holds.

However, a dictionary isn’t the correct type of thing to use for writing to Excel. All the Excel activities are based on datatables. Put your data into a datatable instead of dictionary, and then use Write Range, Append Range, etc depending upon your needs.

Could you send me one example like in my xaml?

Thanks.