Create Index Number in excel column

Hi All,

I would like to create Index column in my datatable.
and value should be like : 0,1,2,3,4.
Can anybody help me how to do it.
image

I have assigned one variable "indexvar = 0 and then Indexvar = Indexvar+1 but its returning me all 1 .

Hi @Asitabha_Deb_asitabhad

Using For each row of datatable properties we can create index variable that will starts from zero!

Regards

As I have mentioned I have created variable “Indexvar=0” under For each data row and assigned again this "Indexvar = Indexvar+1.

But its returning all cell value = 1.

Hi @Asitabha_Deb_asitabhad

Create a index variable in For each row properties and use the variable as your index

Refer to screen shot below!

Regards

Hi ,

Are you asking this.
image
image

Hi @Asitabha_Deb_asitabhad

If You create a index variable in the properties of the for each row it will iterate automatically as per the datatable index and its starts from zero!

Regards

Hi ,
please refer attachment below,
Demo_index.zip (9.0 KB)

Regard,

Hi @Asitabha_Deb_asitabhad

Please find the sample xaml below!

test_Sequence.xaml (8.3 KB)

Regards

Some error showing.
image

PLease give me the screenshots.

Hi @Asitabha_Deb_asitabhad

Refer the screenshots below!

image

Regards

Be sure the scope of your indexvar is wide enough. If is set to the body sequence of your do-while loop, it is reinitialized each cycle. (So reset to 0 which then adds 1 again)
If the scope is at least the do-while loop or wider, your increment will continue to 0,1,2,3 etc…

Why I am getting this error.
image

Hi,

Use row(“index”)

Hi,
please find below screen shorts.

source data as TestingData.xlsx

Source Code…

After executing process…

Regards,

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