Shift cells up in excel

Hi All,

I have an excel which i wish to manipulate. I need to columns to be updated. I need cell values in Column ‘Quantity’ to move up by 3 cells and Column ‘UnitPrice’ to move up by 1 cell.
Input and resultant excels are shown below.

1 Like

HI @tilarapiyush

You can use the Delete range activity

  • Use excel application scope
    • LookupRange for Column quantity and save the address in a variable
    • LookupRange for column UnitPrice and save the address in a variable
    • Delete range for quantity column with the dynamic column column address with regex and enable shift cell in the properties.
    • Delete range for UnitPrice column with the dynamic column column address with regex and enable shift cells in the properties.

Checkout this sample workflow with your actual input
Sample.xaml (8.7 KB)

Regards
Sudharsan

Hi @tilarapiyush

We can implement this requirement using AsEnumerable.Skip() and AsEnumerable.Take() functions

In Assign Activity

dt_Temp = dt_ColOuput.AsEnumerable.Skip(intRowsToMove).CopyToDataTable

In Merge Data Table activity

dt_ColOuput.AsEnumerable.Take(intRowsToMove).CopyToDataTable

Move_Excel_Column_Value_Up.xaml (10.6 KB)

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