Extract specific column from an excel

datatable
excel
activities
studio

#1

Hello,

I have to extract information from an excel and for that I want to process this file row by row. From each row I want to extract only the information stored in specific columns. This information will be stored in a variable that will later be saved in a Dictionary (One Dictionary per row). So then each row will be a Dictionary and the set of Dictionaries will be stored in a List (of object). I will then iterate to dump the information stored in a web

What activity do I have to use to extract the entire excel file and then iterate over the? Read range, read row, read file ??

I show a xaml with what I have managed to make up for now.

Thanks a lot for your suggestions,

A greeting.Main.xaml (11.5 KB)


#2

@Yur,

You can use Read Range, this will give you a result of datatable.

Then use for each loop activity with the datarow type, so that you can extract the data easily from that column and use add to dictionary activity to add it.

If you want to create a single dictionary then have the declaration and initialization outside of the for loop.

But I am not sure why you are adding it all to a collection at end of your workflow


#3

Thank you very much for your suggestion.

Finally I was able to solve the problem.

Regards