Write in excel sheet

I want to write the value in excel sheet in a single column but different rows
I am using a for loop to get the value and that value I need to put in excel sheet,
like for the first iteration what i get write in A1, for second iteration put in A2, for third in A3 like that for n iterations how can it be achieve

use for each loop to iterate the values you want write

use write cell activity in that address give like A+(currentindex+1).ToString

so for each iteration it will increament like A1 ,A2,A3 and soon An

Regards

Hi @ajindal

You can achieve this in a While loop like this:

image

Hope this helps,
Best Reards.

Hi @ajindal
Try this way

Regards,

Use the Write cell activity. In this activity you have an auto increment option it will automatically increase its cell.
image
I hope it helps!!

Thanks for the reply
I didn’t understand index here and also if index is greater than n how it is working

can you help it with the workflow

@ajindal

‘index’ is a zero-based value that represents the number of iterations that the loop has executed. If the index value is 4, that means the loop has been iterated 5 times now.

Hope this helps,
Best Regards.

in for for each you will give the your data for iteration

you can give the currentindex if not present for you otherwise you will get it automatically for new version of packages

in write cell you will the index for increament

Hope this helps

Regards

its not working

It is showing the last iterated value in A1

@ajindal

Try this expression:

"A"+(CInt(idx)+1).ToString

Best Regards.

what is not working ?

in for each loop you have given as object , it should be match right?

can you check the it is iterating or not by using write line in the loop

Regards

idx is alreadt int32 i also tried but not working

it is coming in message box also the latest iteration is got written in excel sheet

Can you try removing the unnecessary empty spaces in the expression & try it again?

not working
It is updating in the A1 only

@ajindal

We would suggest you debug the workflow & determine the iteration parameter that you are passing. Also, check for the number of matches that falls under the looping condition.

Best Regards.

Iteration what is passing is having values as it is printing for the first time, then for the second iteration the value what is there get updated in the same cell
Index for excel sheet is not incrementing

can you use write line to check index as well

or if not happening then try change the system package either upgrade or downgrading

Regards

thanks for the help i wll try to solve it