How to write into excel!

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

Hi @Kancharla_Mahija

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 -
image

Hope it helps!!

@Kancharla_Mahija

  1. Initialize Array:
  • Use an “Assign” activity to create an array variable.
  • Example: myArray = {"Item1", "Item2", "Item3", "Item4"}
  1. For Each Loop:
  • Use a “For Each” activity to iterate through each item in the array.
    • Set the TypeArgument property to String.
    • Set the Values property to your array (myArray).
  1. 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

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

Check the below workflow,

Hope you understand!!