I need to write into excel where each item in the array but must be written in a cell and the next input in array must be write in next row.
use foreach loop to iterate the array, under index create a variable, this index will increment after each iteration in the loop, so you can use it as the row number
Use for each activity to iterate the each item in the input array.
Use write cell activity to write the each item in each excel.
Note - Don’t forget to check the Auto increment row option in Write cell activity.
Check the below workflow for better understanding,
Output -
Hope it helps!!
- Initialize Array:
- Use an “Assign” activity to create an array variable.
- Example:
myArray = {"Item1", "Item2", "Item3", "Item4"}
- For Each Loop:
- Use a “For Each” activity to iterate through each item in the array.
- Set the
TypeArgument
property toString
. - Set the
Values
property to your array (myArray
).
- Set the
- Write to Excel Inside Loop:
- Inside the “For Each” activity, use a “Write Cell” activity to write each item to the Excel file.
- Set the
Cell
property to indicate the cell where the current item should be written (e.g.,"A" + (index + 2).ToString
). - Set the
Text
property to the current item in the loop.
Main.xaml (8.6 KB)
check the xaml file
hope its help
- Set the
This is writing every thing in one row instead what happens is array ={1,2,3} should be printed as 1 2 3 in a row and once the array gets updated to array={4,5,6} it should be printed in a next new row after 1 2 3
@Kancharla_Mahija
check the above xaml file
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.