I’m currently working on creating an automation using Excel Activities, but I’ve encountered some problems and I need your assistance.
My goal is to create an Excel file with specific headers, namely “Title” and “Import,” and populate each column header with information from two variables. However, I’m unsure about the correct approach.
So far, here’s what I have done: I “built a data table” with the two headers, and then used a “For Each Row” activity to iterate through the data table and “add data row”. Next, I included an “Excel Scope” activity where, for each excel row, I used an “write datatable to excel” activity to write the data table to the Excel file. Finally, I used the “Save Excel File As…” activity to save the file.
I would greatly appreciate your help with this matter! Thank you!
Hi @Carla_Munoz
1.Build a Data Table
2.For Each row in Data Table
3.In for each use Add Data Row activity to add variables
4.Outside for each use write range workbook activity
@Carla_Munoz
If you have just variables then their is no need to put for loop outside “Add Data Row” activity
Just put add data row activity and assign in array section like this
{Var1,var2}
@Carla_Munoz
Their is no need to make variable as well you can pass specific column values in Add DataRow activity
Like this
{CurrentRow(“YourColumn”).tostring, CurrentRow(“YourColumn”).tostring}