I have An logic to remove last two columns from excel - DT.DefaultView.ToTable(False,DT.Columns.Cast(Of DataColumn).Select(Function(x)x.ColumnName).Take(DT.Columns.Count-2).toArray)
But i need to remove 1st two columns… can you please suggest me a logic for this.
To remove the first two columns from an Excel file using UiPath, you can use the following logic:
Read the Excel file using the “Excel Application Scope” activity and store the output in a DataTable variable (let’s call it DT).
Use the “Remove Data Column” activity twice to remove the first two columns of the DataTable. For example, if the column names are “Column1” and “Column2”, you can use the following expressions: