How to add data to Excel using a variable and that variable contains several values

I need to save the data in Excel sheet using one column in which I am assigning the values from several if else loop

Hello @Kunal_Jain ,

Could you give more clarity on the requirement? Do you want to add an array of Data to the Excel column? or is the requirement something different?

If you need to add all the array items to the column, then you can write a while loop and loop through the array and use write cell activity to write to the excel,
In the Write cell you can provide the Range as “A”+i.ToString. Where A is the column Name and i is the counter you need to create.

Well my requirement is a bit different
I need to push the value in excel file that is from different columns and I need to put the data into the same column after applying some conditions
If D1 column has date then it will save it directly in the new column
If D1 has no data then it will check D2 Column and find the value in D2 then also the entry will be in same column

Here you can use a Foreach row in excel and inside that use a if condition. If no value in DT1, use write cell and update the cell value. Else write the other condition.,

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