How to autoincrement the serial number in the excel the serial number has to start from one. In builddatatable activity I created field slno with data type int32.checked the autoincrement checkbox.then in the adddatarow activity add arrayrow as “nothing”. Anyone please help to solve this issue.
I tried but getting error “Array initializer has too few dimensions.value of type 2d array of string cannot be converted to id array of object”.
Here serial no is taking from zero.but it has to start from one…
@Nithinkrishna If you create a column in data table with type Int32 it will take starting value as 0. Why don’t you try passing the counter variable which has Slno in add data row activity ( along with employee name)
Hey @Chippy_Kolot
You can set it but not through activity as it doesn’t have the prop.
Kindly ref this to write in code - DataColumn.AutoIncrement Property (System.Data) | Microsoft Learn
Hope this helps.
Thanks
#nK
Ya I got.Thank you.
1.In datatable I created a column named serialno with datatype Int32.
2.After add datarow activity I created a variable in assign activity.(Serialno=Serialno+1).
3.Passed this variable to the add data row activity.
Kindly close this topic if any of the above solutions helps you. This way it helps others who are facing similar issue