How to add new column "Sr. No" with insert serial numbers for rows in excel?


Hi I have an excel file with multiple columns, I need to now insert a column in the beginning with the serial number for the available rows. How this can be done? Please suggest a solution.



Hi @Komal_Joshi,

Use read range activity to get the data to DataTable.
use add data Column activity to add the “S.No” Column -> check the Property AutoIncrement, TypeOf Argument is int32 .
use Write Range activity to write the data into Excel File.

Arivu :slight_smile:


Hi, Thanks.
It says Add data column : These columns don’t currently have unique values. Can you please share a xaml file. Please find the excel sheet here. SampleData.xlsx (12.0 KB)


hi ,
please find attached xaml file.Main.xaml (7.1 KB)


tell me if any changes required


Hi Thank you for your reply. How will I be able to insert serial numbers in column Sr. No? Here is the sample Data file I am referring to. Please suggest me the way to print row numbers for the existing rows. SampleData.xlsx (12.0 KB)


what you want in that Sr no column.Its 1,2,3…??


Yes. 1,2,3 numbers upto 100.


OK…give me some time i will provide you that solution


Sure. Thank you… That will be really helpful!


Hi Komal,
Did you get the solution of the above mentioned problem? If so, please share the solution



Hi simi,
Please find attached the solution I worked on. Sample.xlsx (8.3 KB)
Sr.No. workaround using hotkeys.xaml (25.5 KB)