I’m trying to get some values in my excel DataTable with Active Directory-Get Object Properties activity. But when I try to get values from excel data , it gives error for me on for each side.
Is there any suggestion , how can I get values and convert them to for AD Activity type in for each ?
I think DistinguishedName property will be the following.
Please modify the above columnname to actual column which has dn.
What’s the type argument you have selected for, For Each activity
Change it to the IEnumerable data row and try the way as @Yoichi said, this might can solve the issue.
I try but same as before ;
@burakavuncu kindly follow this approach
Can you try to set just DataRow instead of
IEnumerable<DataRow> at TypeArgument property of ForEach activity?
Can you share excel template file too please?
Active_Directory.xaml (15.7 KB)
sample.xlsx (11.5 KB)
My excel and my xaml .
It works by the way ,ı can pass now ı just need to write all outputs coming from “Get Object Properties” to excel. How can ı do that?
I need to write results to excel .
@burakavuncu there are multiple ways to do it but you can follow the below approach:
- Use a build datatable activity to create the datatable structure outside the for each loop.
- Inside the loop use add data row activity to add the value to the table
- After for each use write range activity and pass the datatable variable to that activity it will dump all the data to the excel file.
Could you send me example if you have ?
Cause when ı try it ı got error on add data row .
@burakavuncu PFA the example, this is just for reference
AddDataFromADToExcel.xaml (13.6 KB)