Reading Data from Excel Sheet into Different Variables

I’m trying to automate an Excel sheet that contains certain employee data. Each column contains different information (first/last name, ID, etc) of the employee represented by each row. Using Read Range, I can store the information of each employee in one datatable variable. However, I want to split this information into separate variables so I can pass it to another workflow. Is there a way to do this without having to use a bunch of assign activities, one for each variable, which would be relatively tedious? I thought of looping through an array containing the variables, but unfortunately, I don’t think this is possible without C style pointers. I would appreciate any suggestions. Thank you.

Hi @Matt1

Can you please share your input format and the output you are looking for

Thanks

Hi,

How about using dictionary as the following? We can use it like dict("ColumnName")

Regards,

Sure, the input will be an Excel workbook like this:


And I want the information to populate the variables in my workflow:

firstname=row(“Columnname”)

Here firstname is variable and row(“columnname”) is value of you column name

Hi @Matt1

If you are using assign activity and if you feel you are passing to many variables to the other workflow then as @Yoichi suggested you can take all the values to the dictionary variable and then instead of passing all the variables to the other workflow you can just pass the dictionary variable and later in the workflow use directly as Dict_var(“YourColName”).

1 Like

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