Insert row at any position in an excel file

I can’t use app integration in excel as it doesn’t work in my laptop.
So there is any logic to insert a row at any position in excel using other technique.

You can interact with excel files using VB.Net code and the InvokeCode UiPath activity:

Can you share me workflow

There are many examples on the forum of interacting with Excel using VB code.

However, if “excel doesn’t work on your laptop”, it may still not help you. You need excel to work with excel files.

I have tried all the possible sol to excel to work but not get the output so, plz find any way to insert row in database,
Thanks in advance.

What database are you referring to? If you do not have excel you cannot use the UiPath excel activities.

To perform some of the Excel services even when Excel is not installed on your machine, you can use “Workbook” related activities.
I have created a workflow that uses “Workbook” activities and inserts a row at any position - InsertRowAtAnyPositionInExcelWithoutUsingExcel.xaml (10.5 KB)
The steps followed were -

  1. Read the input sheet into a data table
  2. Find out the position where you want to insert the new row.
  3. Copy the rows that are present before the insert position from input data table to a new data table
  4. Now add the new row to the new data table
  5. Copy remaining rows from the input data table to the new data table.

Hope this helps!

1 Like

@KartikPurohit - Did you try the above workflow? :slight_smile:

Yes,but I am working on some project in which I have to insert new row multiple times also have a watch on time complexity , tnkx for your assistance and sorry for late reply.