Insert/Delete Column Activity in Excel

Hi,

Insert/Delete Column Activity given Excel activities is not removing the pivot table. I am trying to remove 1-6 columns where the pivot table has only 5 columns. It is not deleting the columns (which contains pivot table). Is it the actual behavior or some kind of issue?

Please find the error that i received while trying to delete the columns:

PreparePivotTable : Error in PrepareMaheshCostSheet workflow.
UiPath.Excel.ExcelException: We can’t make this change for the selected cells because it will affect a PivotTable. Use the field list to change the report. If you are trying to insert or delete cells, move the PivotTable and try again. —> System.Runtime.InteropServices.COMException: We can’t make this change for the selected cells because it will affect a PivotTable. Use the field list to change the report. If you are trying to insert or delete cells, move the PivotTable and try again.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32 aWrapperTypes, MessageData& msgData)
at Microsoft.Office.Interop.Excel.Range.Delete(Object Shift)
at UiPath.Excel.WorkbookApplication.<>c__DisplayClass51_0.b__1()
at UiPath.Excel.ExcelContextHelper.Execute(Action action, ExcelContext context, Object contextParams)
— End of inner exception stack trace —
at UiPath.Excel.Activities.ExcelInteropActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Thanks!!

Hi @Gopi_Arumugam ,

Take a look at this .

Regards
Balamurugan.S