Dictionary to Excel column

Hello everyone,

I have a technical problem …
I have a data dictionary (new dictionary (of String, String), whose keys are the column titles of an output Excel file.
I want from my dictionary to feed my Excel file according to the key (which is linked to the column name.

Thanks in advance for your help.

Hi @Julien_Horreau

Check out these threads. It might help you.

Regards,

1 Like

Create datatable variable

  • For Each CurrentKey in yourDict.Keys
    ** Add Data Column CurrentKey to yourDT
  • Add Data Row to yourDT with row array set to yourDict.Values
  • Write/Append Range to Excel from yourDT

Write range Activity (e.g.Workbook, Classic with EAS,…)
In the field, where the DataTable will be passed use

Newtonsoft.Json.Linq.JArray.FromObject({YourDictVar}).ToObject(of DataTable)

Sample:
grafik

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.